From 56d1e78db48a1c7d8f8a8b5974d63544ec15522a Mon Sep 17 00:00:00 2001 From: Yassir-BenBOUBKER <97686091+Yassir-BenBOUBKER@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:36:03 +0000 Subject: [PATCH] fix(map): hide unused selector for link (#133) * fix * delete comments --- src/main/webapp/js/app.min.js | 820 +++++++++++------------ src/main/webapp/js/diagramly/Editor.js | 2 +- src/main/webapp/js/grapheditor/Format.js | 33 +- src/main/webapp/js/integrate.min.js | 820 +++++++++++------------ src/main/webapp/js/viewer-static.min.js | 2 +- src/main/webapp/js/viewer.min.js | 2 +- 6 files changed, 837 insertions(+), 842 deletions(-) diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index d9453c8cab..1e7a3903c7 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -2046,12 +2046,12 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(m){return!(m instanceof mxChildChange)});if(0U.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), -d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=Q+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!q)){var S=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ca){S=!0}),null,mxUtils.bind(this,function(ca){S&&(a.hideDialog(!0),S=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var ca=k(); -null!=ca&&(B=f=ca.w,D=e=ca.h)}ca=mxUtils.getDocumentSize();E=ca.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((ca.width-f-F)/2));Q=Math.max(1,Math.round((E-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,E-F);ca=this.getPosition(O,Q,f,e);O=ca.x;Q=ca.y;U.style.left=O+"px";U.style.top=Q+"px";U.style.width=f+"px";U.style.height=e+ -"px";!n&&b.clientHeight>U.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Q+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=m;this.container=U;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +function Dialog(a,b,f,e,g,d,m,n,t,k,q){var x=t?57:0,B=f,D=e,F=t?0:64,I=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var E=I.height,O=Math.max(1,Math.round((I.width-f-F)/2)),T=Math.max(1,Math.round((E-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,E-F);0U.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), +d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=T+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!q)){var S=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ba){S=!0}),null,mxUtils.bind(this,function(ba){S&&(a.hideDialog(!0),S=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var ba=k(); +null!=ba&&(B=f=ba.w,D=e=ba.h)}ba=mxUtils.getDocumentSize();E=ba.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((ba.width-f-F)/2));T=Math.max(1,Math.round((E-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,E-F);ba=this.getPosition(O,T,f,e);O=ba.x;T=ba.y;U.style.left=O+"px";U.style.top=T+"px";U.style.width=f+"px";U.style.height=e+ +"px";!n&&b.clientHeight>U.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=T+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=m;this.container=U;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2060,8 +2060,8 @@ Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onD var ErrorDialog=function(a,b,f,e,g,d,m,n,t,k,q){t=null!=t?t:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b= document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=q&&q()}),k.className="geBtn",f.appendChild(k));var D=mxUtils.button(e,function(){t&&a.hideDialog();null!=g&&g()}); D.className="geBtn";f.appendChild(D);null!=m&&(e=mxUtils.button(m,function(){t&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(D){var F=m.checked||k.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var E=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var Q=m.checked?1:parseInt(q.value);isNaN(Q)||(O=mxUtils.getScaleForPageCount(Q,f,E))}f.getGraphBounds();var U=Q=0;E=mxRectangle.fromRectangle(E);E.width=Math.ceil(E.width*I);E.height=Math.ceil(E.height*I);O*=I;!F&&f.pageVisible?(I=f.getPageLayout(),Q-=I.x*E.width,U-=I.y*E.height): -F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,Q,U,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var m=document.createElement("input");m.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(m);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); +PrintDialog.prototype.create=function(a){function b(D){var F=m.checked||k.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var E=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var T=m.checked?1:parseInt(q.value);isNaN(T)||(O=mxUtils.getScaleForPageCount(T,f,E))}f.getGraphBounds();var U=T=0;E=mxRectangle.fromRectangle(E);E.width=Math.ceil(E.width*I);E.height=Math.ceil(E.height*I);O*=I;!F&&f.pageVisible?(I=f.getPageLayout(),T-=I.x*E.width,U-=I.y*E.height): +F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,T,U,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var m=document.createElement("input");m.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(m);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); n.appendChild(t);mxEvent.addListener(t,"click",function(D){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(D)});mxEvent.addListener(m,"change",function(){k.checked=!m.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(k);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");n.appendChild(t);mxEvent.addListener(t, "click",function(D){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(D)});d.appendChild(n);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(q);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(k,"change", function(){k.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");m.checked=!k.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; @@ -2076,23 +2076,23 @@ d.appendChild(m);m=document.createElement("td");var k=document.createElement("bu q.style.width="64px";q.style.cursor="pointer";q.style.padding="4px";var x=f.backgroundImage,B=f.background,D=function(F){a.showBackgroundImageDialog(function(I,E,O){E||(null!=I&&null!=I.src&&Graph.isPageLink(I.src)&&(I={originalSrc:I.src}),x=I);B=O;b()},x,B);mxEvent.consume(F)};mxEvent.addListener(k,"click",D);mxEvent.addListener(q,"click",D);b();m.appendChild(q);m.appendChild(k);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop= "16px";m.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&m.appendChild(k);D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var F=parseInt(t.value);isNaN(F)||f.gridSize===F||f.setGridSize(F);F=new ChangePageSetup(a,B,x,n.get());F.ignoreColor=f.background==B;F.ignoreImage=(null!=f.backgroundImage?f.backgroundImage.src:null)===(null!=x?x.src:null);f.pageFormat.width==F.previousFormat.width&& f.pageFormat.height==F.previousFormat.height&&F.ignoreColor&&F.ignoreImage||f.model.execute(F)});D.className="geBtn gePrimaryBtn";m.appendChild(D);a.editor.cancelFirst||m.appendChild(k);d.appendChild(m);g.appendChild(d);e.appendChild(g);this.container=e}; -PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(ca,T,P){if(P||x!=document.activeElement&&B!=document.activeElement){ca=!1;for(T=0;T=ca)x.value=f.width/100;ca=parseFloat(B.value);if(isNaN(ca)||0>=ca)B.value=f.height/100;ca=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), -Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&m.checked&&(ca=new mxRectangle(0,0,ca.height,ca.width));T&&Q||ca.width==U.width&&ca.height==U.height||(U=ca,null!=e&&e(U))};mxEvent.addListener(b,"click",function(ca){d.checked=!0;S(ca);mxEvent.consume(ca)});mxEvent.addListener(k,"click",function(ca){m.checked=!0;S(ca);mxEvent.consume(ca)});mxEvent.addListener(x,"blur",S);mxEvent.addListener(x,"click",S);mxEvent.addListener(B,"blur",S);mxEvent.addListener(B,"click",S);mxEvent.addListener(m,"change", -S);mxEvent.addListener(d,"change",S);mxEvent.addListener(n,"change",function(ca){Q="custom"==n.value;S(ca,!0)});S();return{set:function(ca){f=ca;g(null,null,!0)},get:function(){return U},widthInput:x,heightInput:B}}; +E.key);mxUtils.write(O,E.title);n.appendChild(O)}var T=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(t);a.appendChild(q);var U=f,S=function(ba,R){ba=D[n.value];null!=ba.format?(x.value=ba.format.width/100,B.value=ba.format.height/100,q.style.display="none",t.style.display=""):(t.style.display="none",q.style.display="");ba=parseFloat(x.value);if(isNaN(ba)||0>=ba)x.value=f.width/100;ba=parseFloat(B.value);if(isNaN(ba)||0>=ba)B.value=f.height/100;ba=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), +Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&m.checked&&(ba=new mxRectangle(0,0,ba.height,ba.width));R&&T||ba.width==U.width&&ba.height==U.height||(U=ba,null!=e&&e(U))};mxEvent.addListener(b,"click",function(ba){d.checked=!0;S(ba);mxEvent.consume(ba)});mxEvent.addListener(k,"click",function(ba){m.checked=!0;S(ba);mxEvent.consume(ba)});mxEvent.addListener(x,"blur",S);mxEvent.addListener(x,"click",S);mxEvent.addListener(B,"blur",S);mxEvent.addListener(B,"click",S);mxEvent.addListener(m,"change", +S);mxEvent.addListener(d,"change",S);mxEvent.addListener(n,"change",function(ba){T="custom"==n.value;S(ba,!0)});S();return{set:function(ba){f=ba;g(null,null,!0)},get:function(){return U},widthInput:x,heightInput:B}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; var FilenameDialog=function(a,b,f,e,g,d,m,n,t,k,q,x,B){t=null!=t?t:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var I=document.createElement("tr");var E=document.createElement("td");E.style.textOverflow="ellipsis";E.style.textAlign="right";E.style.maxWidth=(B?B+15:100)+"px";E.style.fontSize="10pt";E.style.width=(B?B:84)+"px";mxUtils.write(E,(g||mxResources.get("filename"))+":");I.appendChild(E);var O= -document.createElement("input");O.setAttribute("value",b||"");O.style.marginLeft="4px";O.style.width=null!=x?x+"px":"180px";var Q=mxUtils.button(f,function(){if(null==d||d(O.value))t&&a.hideDialog(),e(O.value)});Q.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==m)if(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var U=D.parentNode;if(null!=U){var S=null;mxEvent.addListener(U,"dragleave", -function(ca){null!=S&&(S.style.backgroundColor="",S=null);ca.stopPropagation();ca.preventDefault()});mxEvent.addListener(U,"dragover",mxUtils.bind(this,function(ca){null==S&&(!mxClient.IS_IE||10'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(m,n){a.apply(this,arguments);if(null!=this.shiftPreview1){var t=this.view.canvas;null!=t.ownerSVGElement&&(t=t.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x* this.view.scale+m,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+n,k))+"px";t.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(m,n,t){var k=this.view.scale,q=this.view.translate,x=this.pageFormat,B=k*this.pageScale,D=this.view.getBackgroundPageBounds();n=D.width;t=D.height;var F=new mxRectangle(k*q.x,k*q.y,x.width*B,x.height*B),I=(m=m&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(t/F.height)-1:0,E=m?Math.ceil(n/F.width)-1:0,O=D.x+n, -Q=D.y+t;null==this.horizontalPageBreaks&&0mxUtils.indexOf(d,q[b])&&d.push(q[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(d,m[b])&&d.push(m[b]);var D=function(N,R,K,ba,ia,na,Fa){ba=null!=ba?ba:e.currentVertexStyle;ia=null!=ia?ia:e.currentEdgeStyle;na=null!=na?na:!0;K=null!=K?K:e.getModel();if(Fa){Fa=[];for(var ja=0;jamxUtils.indexOf(n,Ga))&&(La=mxUtils.setStyle(La,Ga,Ma))}Editor.simpleLabels&&(La=mxUtils.setStyle(mxUtils.setStyle(La,"html",null),"whiteSpace",null));K.setStyle(xa,La)}}finally{K.endUpdate()}return N};e.addListener("cellsInserted",function(N,R){D(R.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(N,R){D(R.getProperty("cells"), +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(d,m[b])&&d.push(m[b]);var D=function(N,Q,K,ca,ia,na,Fa){ca=null!=ca?ca:e.currentVertexStyle;ia=null!=ia?ia:e.currentEdgeStyle;na=null!=na?na:!0;K=null!=K?K:e.getModel();if(Fa){Fa=[];for(var ja=0;jamxUtils.indexOf(n,Ga))&&(La=mxUtils.setStyle(La,Ga,Ma))}Editor.simpleLabels&&(La=mxUtils.setStyle(mxUtils.setStyle(La,"html",null),"whiteSpace",null));K.setStyle(xa,La)}}finally{K.endUpdate()}return N};e.addListener("cellsInserted",function(N,Q){D(Q.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(N,Q){D(Q.getProperty("cells"), !0)});this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(N){null==N&&(N=window.event);return e.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown= -F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(N){if(null!=N){var R=mxEvent.getSource(N);if("A"==R.nodeName)for(;null!=R;){if("geHint"==R.className)return!0;R=R.parentNode}}return F(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, -"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var I=e.graphHandler.start;e.graphHandler.start=function(){null!=X.hoverIcons&&X.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, -function(N){var R=mxUtils.getOffset(this.diagramContainer);0document.documentMode)?mxEvent.addListener(this.diagramContainer, +"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var I=e.graphHandler.start;e.graphHandler.start=function(){null!=da.hoverIcons&&da.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, +function(N){var Q=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),R.push(N));N=K}N=this.toolbar.fontMenu;K=this.toolbar.sizeMenu;if(null==Y)this.toolbar.createTextToolbar();else{for(var ba=0;bamxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),Q.push(N));N=K}N=this.toolbar.fontMenu;K=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var ca=0;ca=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2; @@ -2161,7 +2161,7 @@ EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this; a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(t,k){this.isEnabled()&&(null!=k||null==b.sidebar||mxEvent.isShiftDown(t)||a.isCellLocked(a.getDefaultParent()))&&g.apply(this,arguments)};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=function(t, k,q){var x=q.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?m.apply(this,arguments):this.graph.connectVertex(t.cell,k,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var I=a.getCompositeParent(t.cell);B=a.getCellGeometry(I);for(q.consume();null!=I&&a.model.isVertex(I)&&null!=B&&B.relative;)cell=I,I=a.model.getParent(cell),B=a.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(q.getGraphX(),q.getGraphY(),I,mxUtils.bind(this, function(E){F(E);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(E))}),k)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(t,k){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var q=k.getProperty("arrow"),x=k.getProperty("direction"),B=k.getProperty("event");q=q.getBoundingClientRect();var D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+ -q.x-D.x;D=a.container.scrollTop+q.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),E=b.showShapePicker(F,D,I,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(Q,U,S){S(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))},function(Q){a.selectCellsForConnectVertex(Q)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(E,q,F,D,x);mxUtils.setOpacity(E,30);mxEvent.addListener(E,"mouseenter", +q.x-D.x;D=a.container.scrollTop+q.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),E=b.showShapePicker(F,D,I,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(T,U,S){S(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))},function(T){a.selectCellsForConnectVertex(T)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(E,q,F,D,x);mxUtils.setOpacity(E,30);mxEvent.addListener(E,"mouseenter", function(){mxUtils.setOpacity(E,100)});mxEvent.addListener(E,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(t,k){null!=n&&window.clearTimeout(n)}))}}; EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"}; EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d,m){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d,m);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a}; @@ -2187,40 +2187,40 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb 0),B=0;B=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale* -this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==N&&""!=fa.getAttribute("filter")&&(N=fa.getAttribute("filter"),fa.removeAttribute("filter")),J=new mxPoint(a.container.scrollLeft,a.container.scrollTop), -K=ba||null==la?a.container.scrollLeft+a.container.clientWidth/2:la.x+a.container.scrollLeft-a.container.offsetLeft,na=ba||null==la?a.container.scrollTop+a.container.clientHeight/2:la.y+a.container.scrollTop-a.container.offsetTop,fa.style.transformOrigin=K+"px "+na+"px",fa.style.transform="scale("+this.cumulativeZoomFactor+")",Y.style.transformOrigin=K+"px "+na+"px",Y.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(K= -a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(K.style,"transform-origin",(ba||null==la?a.container.clientWidth/2+a.container.scrollLeft-K.offsetLeft+"px":la.x+a.container.scrollLeft-K.offsetLeft-a.container.offsetLeft+"px")+" "+(ba||null==la?a.container.clientHeight/2+a.container.scrollTop-K.offsetTop+"px":la.y+a.container.scrollTop-K.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(K.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity= -"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());R(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(K){null!=X&&window.clearTimeout(X)},null,function(K){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(K){null==X||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(K,ba,ia,na,Fa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs|| -0==this.dialogs.length)if(!a.scrollbars&&!ia&&a.isScrollWheelEvent(K))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(K)?a.view.setTranslate(ia.x+(ba?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(ba?na:-na));else if(ia||a.isZoomWheelEvent(K))for(var ja=mxEvent.getSource(K);null!=ja;){if(ja==a.container)return a.tooltipHandler.hideTooltip(),la=null!=na&&null!=Fa?new mxPoint(na,Fa):new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),V=ia,ia=a.zoomFactor,na=null,K.ctrlKey&&null!= -K.deltaY&&40>Math.abs(K.deltaY)&&Math.round(K.deltaY)!=K.deltaY?ia=1+Math.abs(K.deltaY)/20*(ia-1):null!=K.movementY&&"pointermove"==K.type&&(ia=1+Math.max(1,Math.abs(K.movementY))/20*(ia-1),na=-1),a.lazyZoom(ba,null,na,ia),mxEvent.consume(K),!1;ja=ja.parentNode}}),a.container);a.panningHandler.zoomGraph=function(K){a.cumulativeZoomFactor=K.scale;a.lazyZoom(0=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale* +this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==N&&""!=Z.getAttribute("filter")&&(N=Z.getAttribute("filter"),Z.removeAttribute("filter")),J=new mxPoint(a.container.scrollLeft,a.container.scrollTop), +K=ca||null==la?a.container.scrollLeft+a.container.clientWidth/2:la.x+a.container.scrollLeft-a.container.offsetLeft,na=ca||null==la?a.container.scrollTop+a.container.clientHeight/2:la.y+a.container.scrollTop-a.container.offsetTop,Z.style.transformOrigin=K+"px "+na+"px",Z.style.transform="scale("+this.cumulativeZoomFactor+")",X.style.transformOrigin=K+"px "+na+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(K=a.view.backgroundPageShape.node, +mxUtils.setPrefixedStyle(K.style,"transform-origin",(ca||null==la?a.container.clientWidth/2+a.container.scrollLeft-K.offsetLeft+"px":la.x+a.container.scrollLeft-K.offsetLeft-a.container.offsetLeft+"px")+" "+(ca||null==la?a.container.clientHeight/2+a.container.scrollTop-K.offsetTop+"px":la.y+a.container.scrollTop-K.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(K.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity= +"0",null!=f.hoverIcons&&f.hoverIcons.reset());Q(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(K){null!=da&&window.clearTimeout(da)},null,function(K){1!=a.cumulativeZoomFactor&&Q(0)});mxEvent.addListener(a.container,"scroll",function(K){null==da||a.isMouseDown||1==a.cumulativeZoomFactor||Q(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(K,ca,ia,na,Fa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&& +!ia&&a.isScrollWheelEvent(K))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(K)?a.view.setTranslate(ia.x+(ca?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(ca?na:-na));else if(ia||a.isZoomWheelEvent(K))for(var ja=mxEvent.getSource(K);null!=ja;){if(ja==a.container)return a.tooltipHandler.hideTooltip(),la=null!=na&&null!=Fa?new mxPoint(na,Fa):new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),V=ia,ia=a.zoomFactor,na=null,K.ctrlKey&&null!=K.deltaY&&40>Math.abs(K.deltaY)&&Math.round(K.deltaY)!= +K.deltaY?ia=1+Math.abs(K.deltaY)/20*(ia-1):null!=K.movementY&&"pointermove"==K.type&&(ia=1+Math.max(1,Math.abs(K.movementY))/20*(ia-1),na=-1),a.lazyZoom(ca,null,na,ia),mxEvent.consume(K),!1;ja=ja.parentNode}}),a.container);a.panningHandler.zoomGraph=function(K){a.cumulativeZoomFactor=K.scale;a.lazyZoom(0ia&&null!=Ca&&!mxEvent.isShiftDown(Ia)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style, -mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(ja.model.isVertex(Ca.cell)&&null!=q||ja.model.isEdge(Ca.cell)&&ja.model.isEdge(e[0]))){if(ja.isCellEditable(Ca.cell)){Q= -Ca;var qa=ja.model.isEdge(Ca.cell)?ja.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);Y.style.left=Math.floor(qa.x)+"px";Y.style.top=Math.floor(qa.y)+"px";null==fa&&(ja.container.appendChild(Y),fa=Y.parentNode);m(xa,ya,qa,Y)}}else null==Q||!mxUtils.contains(Q,xa,ya)||1500ia&&null!=Ca&&!mxEvent.isShiftDown(Ia)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style, +mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(ja.model.isVertex(Ca.cell)&&null!=q||ja.model.isEdge(Ca.cell)&&ja.model.isEdge(e[0]))){if(ja.isCellEditable(Ca.cell)){T= +Ca;var qa=ja.model.isEdge(Ca.cell)?ja.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==Z&&(ja.container.appendChild(X),Z=X.parentNode);m(xa,ya,qa,X)}}else null==T||!mxUtils.contains(T,xa,ya)||1500ia&&ia>this.dropTargetDelay||ja.model.isEdge(Ja)?Ca:null,null!=E&&qa){ta=[X,la,S,ca,T,P];for(qa=0;qaia&&ia>this.dropTargetDelay||ja.model.isEdge(Ja)?Ca:null,null!=E&&qa){ta=[da,la,S,ba,R,P];for(qa=0;qaR||Math.abs(m.y-V.getGraphY())>R){var K=this.selectionCellsHandler.getHandler(N.cell);null==K&&this.model.isEdge(N.cell)&&(K=this.createHandler(N));if(null!=K&&null!=K.bends&&0Q||Math.abs(m.y-V.getGraphY())>Q){var K=this.selectionCellsHandler.getHandler(N.cell);null==K&&this.model.isEdge(N.cell)&&(K=this.createHandler(N));if(null!=K&&null!=K.bends&&0B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0I||Math.abs(S.y-Q.y)>I)&&(Math.abs(S.x-O.x)>I||Math.abs(S.y-O.y)>I)&&(Math.abs(S.x-fa.x)>I||Math.abs(S.y-fa.y)>I)&&(Math.abs(S.x-Y.x)>I||Math.abs(S.y-Y.y)>I)){Y=S.x-Q.x;fa=S.y-Q.y;S={distSq:Y*Y+fa*fa,x:S.x,y:S.y};for(Y=0;YS.distSq){U.splice(Y,0,S);S=null;break}null==S||0!=U.length&&U[U.length-1].x===S.x&&U[U.length-1].y===S.y||U.push(S)}}}for(T= -0;TF*F&&0F*F&&(Y=new mxPoint(P.x-S.x,P.y-S.y),T=new mxPoint(P.x+S.x,P.y+S.y),U.push(Y),this.addPoints(q,U,B,D,!1,null,E),U=0>Math.round(S.x)||0==Math.round(S.x)&&0>=Math.round(S.y)?1:-1,E=!1,"sharp"==I?(q.lineTo(Y.x-S.y*U,Y.y+S.x*U),q.lineTo(T.x-S.y*U,T.y+S.x*U),q.lineTo(T.x,T.y)):"line"==I?(q.moveTo(Y.x+S.y*U,Y.y-S.x*U),q.lineTo(Y.x-S.y*U,Y.y+S.x*U),q.moveTo(T.x-S.y*U,T.y+S.x*U), -q.lineTo(T.x+S.y*U,T.y-S.x*U),q.moveTo(T.x,T.y)):"arc"==I?(U*=1.3,q.curveTo(Y.x-S.y*U,Y.y+S.x*U,T.x-S.y*U,T.y+S.x*U,T.x,T.y)):(q.moveTo(T.x,T.y),E=!0),U=[T],Y=!0))}else S=null;Y||(U.push(P),O=P)}this.addPoints(q,U,B,D,!1,null,E);q.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(q,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):m.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(q,x,B,D){if(null==x||null==q||"1"!=x.style.snapToPoint&&"1"!=q.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(q,x,D);var F=this.getNextPoint(q,B,D),I=this.graph.isOrthogonal(q),E=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=E){var Q=Math.cos(-E),U=Math.sin(-E);F=mxUtils.getRotatedPoint(F,Q,U,O)}Q=parseFloat(q.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);Q+=parseFloat(q.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==E&&I,Q);0!=E&&(Q=Math.cos(E),U=Math.sin(E),F=mxUtils.getRotatedPoint(F,Q,U,O));q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(q,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(q,x,B,D,F){if(null!=x&&null!=q){q=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=q)for(var I=0;II||Math.abs(S.y-T.y)>I)&&(Math.abs(S.x-O.x)>I||Math.abs(S.y-O.y)>I)&&(Math.abs(S.x-Z.x)>I||Math.abs(S.y-Z.y)>I)&&(Math.abs(S.x-X.x)>I||Math.abs(S.y-X.y)>I)){X=S.x-T.x;Z=S.y-T.y;S={distSq:X*X+Z*Z,x:S.x,y:S.y};for(X=0;XS.distSq){U.splice(X,0,S);S=null;break}null==S||0!=U.length&&U[U.length-1].x===S.x&&U[U.length-1].y===S.y||U.push(S)}}}for(R=0;R< +U.length;R++)B=F(1,U[R].x,U[R].y)||B}S=x[x.length-1];B=F(0,S.x,S.y)||B}q.routedPoints=D;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(q,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style, +"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),E=!0,O=null,T=null,U=[],S=null;q.begin();for(var ba=0;baF*F&&0F*F&&(X=new mxPoint(P.x-S.x,P.y-S.y),R=new mxPoint(P.x+S.x,P.y+S.y),U.push(X),this.addPoints(q,U,B,D,!1,null,E),U=0>Math.round(S.x)||0==Math.round(S.x)&&0>=Math.round(S.y)?1:-1,E=!1,"sharp"==I?(q.lineTo(X.x-S.y*U,X.y+S.x*U),q.lineTo(R.x-S.y*U,R.y+S.x*U),q.lineTo(R.x,R.y)):"line"==I?(q.moveTo(X.x+S.y*U,X.y-S.x*U),q.lineTo(X.x-S.y*U,X.y+S.x*U),q.moveTo(R.x-S.y*U,R.y+S.x*U),q.lineTo(R.x+ +S.y*U,R.y-S.x*U),q.moveTo(R.x,R.y)):"arc"==I?(U*=1.3,q.curveTo(X.x-S.y*U,X.y+S.x*U,R.x-S.y*U,R.y+S.x*U,R.x,R.y)):(q.moveTo(R.x,R.y),E=!0),U=[R],X=!0))}else S=null;X||(U.push(P),O=P)}this.addPoints(q,U,B,D,!1,null,E);q.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(q,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):m.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(q,x,B,D){if(null==x||null==q||"1"!=x.style.snapToPoint&&"1"!=q.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(q,x,D);var F=this.getNextPoint(q,B,D),I=this.graph.isOrthogonal(q),E=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=E){var T=Math.cos(-E),U=Math.sin(-E);F=mxUtils.getRotatedPoint(F,T,U,O)}T=parseFloat(q.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);T+=parseFloat(q.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==E&&I,T);0!=E&&(T=Math.cos(E),U=Math.sin(E),F=mxUtils.getRotatedPoint(F,T,U,O));q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(q,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(q,x,B,D,F){if(null!=x&&null!=q){q=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=q)for(var I=0;I=da.x&&this.model.remove(ra[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +L=0;L=ea.x&&this.model.remove(ra[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, null,[u]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[u]);var Na=this.model.getTerminal(A,!1);if(null!=Na){var Qa=this.getCurrentCellStyle(Na);null!=Qa&&"1"==Qa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[u]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[u]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var k=Graph.prototype.selectCell;Graph.prototype.selectCell= -function(u,z,A){if(z||A)k.apply(this,arguments);else{var C=this.getSelectionCell(),G=null,L=[],W=mxUtils.bind(this,function(ea){if(null!=this.view.getState(ea)&&(this.model.isVertex(ea)||this.model.isEdge(ea)))if(L.push(ea),ea==C)G=L.length-1;else if(u&&null==C&&0G||!u&&0G||!u&&0Ea)for(Aa=0;Aa>Ea;Aa--)this.model.remove(Ra[Ra.length+Aa-1]);Ra=this.model.getChildCells(u[Z],!0);for(Aa=0;AaEa)for(Aa=0;Aa>Ea;Aa--)this.model.remove(Ra[Ra.length+Aa-1]);Ra=this.model.getChildCells(u[Y],!0);for(Aa=0;AamxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(u[C],"")}else{if(this.isTableRow(u[C])&& -(L=this.model.getParent(u[C]),0>mxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),ea=0,Z=0;ZmxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),fa=0,Y=0;YL||da>L)&&this.clear());else{for(Z=da.getSource();null!=Z&&"a"!=Z.nodeName.toLowerCase();)Z=Z.parentNode;null!=Z?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&W.tooltipHandler.reset(da,!0,this.currentState),(null==this.currentState||da.getState()!=this.currentState&&null!=da.sourceState||!W.intersects(this.currentState,da.getGraphX(), -da.getGraphY()))&&this.updateCurrentState(da))}},mouseUp:function(Z,da){var ra=da.getSource();for(Z=da.getEvent();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null==ra&&Math.abs(this.scrollLeft-W.container.scrollLeft)L||ea>L)&&this.clear());else{for(Y=ea.getSource();null!=Y&&"a"!=Y.nodeName.toLowerCase();)Y=Y.parentNode;null!=Y?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&W.tooltipHandler.reset(ea,!0,this.currentState),(null==this.currentState||ea.getState()!=this.currentState&&null!=ea.sourceState||!W.intersects(this.currentState,ea.getGraphX(), +ea.getGraphY()))&&this.updateCurrentState(ea))}},mouseUp:function(Y,ea){var ra=ea.getSource();for(Y=ea.getEvent();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null==ra&&Math.abs(this.scrollLeft-W.container.scrollLeft)ob&&kb++;mb++}jb.lengthmxUtils.indexOf(C,L)&&C.push(L); +u[C].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(u){u=new mxSvgCanvas2D(u);u.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;u.pointerEvents=!0;return u};Graph.prototype.getSelectedTextBlocks=function(){function u(W){if(W.firstChild)return W.firstChild;for(;W;){if(W.nextSibling)return W.nextSibling;W=W.parentNode}}function z(W){var fa=W.startContainer,Y=W.endContainer;W=W.commonAncestorContainer;var ea=[],ra;for(ra=fa.parentNode;ra&&(ea.push(ra),ra!=W);ra= +ra.parentNode);ea.reverse();for(ra=fa;ra&&(ea.push(ra),ra!=Y);ra=u(ra));return ea}var A=[this.getSelectedElement()];if(window.getSelection){var C=window.getSelection();C.getRangeAt&&C.rangeCount&&(A=z(C.getRangeAt(0)))}C=[];for(var G=0;GmxUtils.indexOf(C,L)&&C.push(L); break}else L=L.parentNode;return C};Graph.prototype.getSelectedElement=function(){var u=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(u=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1== this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,z,A){for(;null!=u&&u.nodeName!=z;){if(u==A)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,z,A){for(;null!=u&&!(0<=mxUtils.indexOf(z,u.nodeName));){if(u==A)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var z=null;if(window.getSelection){if(z= window.getSelection(),z.getRangeAt&&z.rangeCount){var A=document.createRange();A.selectNode(u);z.removeAllRanges();z.addRange(A)}}else(z=document.selection)&&"Control"!=z.type&&(u=z.createRange(),u.collapse(!0),A=z.createRange(),A.setEndPoint("StartToStart",u),A.select())};Graph.prototype.flipEdgePoints=function(u,z,A){var C=this.getCellGeometry(u);if(null!=C){C=C.clone();if(null!=C.points)for(var G=0;G=L.length)z.remove(A);else{var W=L.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(L,u));for(C=u=0;C=G.length)z.remove(A);else{this.isTableRow(C)||(C=G[G.length-1]);z.remove(C);u=0;var L=this.getCellGeometry(C);null!=L&&(u=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(), +mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(u,z){var A=null;if(null!==u&&0=L.length)z.remove(A);else{var W=L.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(L,u));for(C=u=0;C=G.length)z.remove(A);else{this.isTableRow(C)||(C=G[G.length-1]);z.remove(C);u=0;var L=this.getCellGeometry(C);null!=L&&(u=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(), W.height-=u,z.setGeometry(A,W))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(u,z){for(var A=u.tBodies[0],C=A.rows[0].cells,G=u=0;Gz&&u[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div"); A.innerHTML=u;u=document.createDocumentFragment();for(var C;C=A.firstChild;)lastNode=u.appendChild(C);z.insertNode(u)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(u)};Graph.prototype.getCentrenMapImagePath=function(u){return window.localStorage.getItem("centreon-url")+"/modules/centreon-map4-web-client/img/"+u};Graph.prototype.setCellDimensions=function(u,z,A){var C=this.getCellGeometry(u);null!=C&&(C=C.clone(),z&&(C.width=z),A&&(C.height=A),this.getModel().setGeometry(u, @@ -2845,9 +2845,9 @@ C))};Graph.prototype.handleCentreonStyleChangeForCells=function(u,z){var A=this; this.addWeatherIconToResource(u)};Graph.prototype.addWeatherIconToResource=function(u){var z=this.getCentrenMapImagePath("weather/weather.svg");z=new mxImage(z,30,30);z=new mxCellOverlay(z,"Weather",null,mxConstants.ALIGN_TOP);this.addCellOverlay(u,z)};Graph.prototype.removeWeatherIconToResource=function(u){this.removeCellOverlay(u)};Graph.prototype.createLinkForHint=function(u,z){function A(G,L){G.length>L&&(G=G.substring(0,Math.round(L/2))+"..."+G.substring(G.length-Math.round(L/4)));return G}u= null!=u?u:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(u)?this.getLinkTitle(u):u;var C=document.createElement("a");C.setAttribute("rel",this.linkRelation);C.setAttribute("href",this.getAbsoluteUrl(u));C.setAttribute("title",A(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&C.setAttribute("target",this.linkTarget);mxUtils.write(C,A(z,40));this.isCustomLink(u)&&mxEvent.addListener(C,"click",mxUtils.bind(this,function(G){this.customLinkClicked(u);mxEvent.consume(G)})); return C};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,W){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(L){L=u.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var W=this.getCellAt(L.graphX,L.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,L.graphX,L.graphY)||(L.state= -this.view.getState(W),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,C=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,W,ea){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),C=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this, -function(L,W){var ea=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!C&&!ea&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));ea=!z||ea?null:mxUtils.bind(this,function(Z){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var da=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ -da.x+1,W.getY()+da.y+1,Z,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,W,ea])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection(): +this.view.getState(W),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,C=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,W,fa){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),C=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this, +function(L,W){var fa=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!C&&!fa&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));fa=!z||fa?null:mxUtils.bind(this,function(Y){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ea=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ +ea.x+1,W.getY()+ea.y+1,Y,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,W,fa])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection(): document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),C="\t";if(null!=u)for(C="";0")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var u=this.graph.view.getState(this.editingCell); -if(null!=u){var z=null!=u&&"0"!=mxUtils.getValue(u.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ea=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):ea,!0);this.textarea.className="mxCellEditor geContentEditable";Z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY, +if(null!=u){var z=null!=u&&"0"!=mxUtils.getValue(u.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){fa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):fa,!0);this.textarea.className="mxCellEditor geContentEditable";Y=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY);var C=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Z*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Z)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=C;this.textarea.style.padding= -"0px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML=ea,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ea=Graph.sanitizeHtml(z? -ea.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ea,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var Z=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Z*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Z)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY; -this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML=ea);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,z){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&& +0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Y*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Y)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=C;this.textarea.style.padding= +"0px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));fa=Graph.sanitizeHtml(z? +fa.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):fa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var Y=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Y*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Y)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY; +this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,z){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&& null!=u){var A=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*A;this.bounds.height=60*A;var C=null!=u.text?u.text.margin:null;null==C&&(C=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=C.x*this.bounds.width;this.bounds.y+=C.y*this.bounds.height}this.textarea.style.width= Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return A=Graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=Graph.sanitizeHtml(this.textarea.innerHTML,!0);return z= "1"==mxUtils.getValue(u.style,"nl2Br","1")?z.replace(/\r\n/g,"
").replace(/\n/g,"
"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var U=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();U.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var S=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,z){this.graph.getModel().beginUpdate(); try{S.apply(this,arguments),""==z&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){var z=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=u.cell.geometry&&0this.unscaledBounds.width&&(this.unscaledBounds.width=84);"SHAPE"!==A&&84>this.unscaledBounds.height&&(this.unscaledBounds.height= -84);z.relative||(Z=this.graph.getMaximumGraphBounds(),null!=Z&&null!=this.parentState&&(Z=mxRectangle.fromRectangle(Z),Z.x-=(this.parentState.x-ea.x*C)/C,Z.y-=(this.parentState.y-ea.y*C)/C),this.graph.isConstrainChild(this.state.cell)&&(da=this.graph.getCellContainmentArea(this.state.cell),null!=da&&(A=this.graph.getOverlap(this.state.cell),0Z.x+Z.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-Z.x-Z.width),this.unscaledBounds.y+this.unscaledBounds.height>Z.y+Z.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+ -this.unscaledBounds.height-Z.y-Z.height)));A=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:ea.x*C)+this.unscaledBounds.x*C,(null!=this.parentState?this.parentState.y:ea.y*C)+this.unscaledBounds.y*C,this.unscaledBounds.width*C,this.unscaledBounds.height*C);z.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);Z=Math.cos(L);da=Math.sin(L);z=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY()); -ra=z.x-G.x;W=z.y-G.y;z=Z*ra-da*W-ra;G=da*ra+Z*W-W;ea=this.bounds.x-this.state.x;ra=this.bounds.y-this.state.y;L=Z*ea-da*ra;Z=da*ea+Z*ra;this.bounds.x+=z;this.bounds.y+=G;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+z/C);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+G/C);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);this.graph.isCellCollapsed(this.state.cell)||0==z&&0==G?this.childOffsetY= -this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+L,this.childOffsetY=this.state.y-this.bounds.y+Z);A.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(u),null!=this.preview?this.drawPreview():this.updateParentHighlight())}};var fa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)}; -mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var X=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return X.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible= -function(u){return u.tableHandle||la.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var u=0;this.graph.isTableRow(this.state.cell)?u=1:this.graph.isTableCell(this.state.cell)&&(u=2);return u};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())}; -var V=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var u=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(Pa,Ea,Aa){for(var Ba=[],Ta=0;Tathis.unscaledBounds.width&&(this.unscaledBounds.width=84);"SHAPE"!==A&&84>this.unscaledBounds.height&&(this.unscaledBounds.height= +84);z.relative||(Y=this.graph.getMaximumGraphBounds(),null!=Y&&null!=this.parentState&&(Y=mxRectangle.fromRectangle(Y),Y.x-=(this.parentState.x-fa.x*C)/C,Y.y-=(this.parentState.y-fa.y*C)/C),this.graph.isConstrainChild(this.state.cell)&&(ea=this.graph.getCellContainmentArea(this.state.cell),null!=ea&&(A=this.graph.getOverlap(this.state.cell),0Y.x+Y.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-Y.x-Y.width),this.unscaledBounds.y+this.unscaledBounds.height>Y.y+Y.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+ +this.unscaledBounds.height-Y.y-Y.height)));A=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:fa.x*C)+this.unscaledBounds.x*C,(null!=this.parentState?this.parentState.y:fa.y*C)+this.unscaledBounds.y*C,this.unscaledBounds.width*C,this.unscaledBounds.height*C);z.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);Y=Math.cos(L);ea=Math.sin(L);z=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY()); +ra=z.x-G.x;W=z.y-G.y;z=Y*ra-ea*W-ra;G=ea*ra+Y*W-W;fa=this.bounds.x-this.state.x;ra=this.bounds.y-this.state.y;L=Y*fa-ea*ra;Y=ea*fa+Y*ra;this.bounds.x+=z;this.bounds.y+=G;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+z/C);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+G/C);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);this.graph.isCellCollapsed(this.state.cell)||0==z&&0==G?this.childOffsetY= +this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+L,this.childOffsetY=this.state.y-this.bounds.y+Y);A.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(u),null!=this.preview?this.drawPreview():this.updateParentHighlight())}};var Z=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)}; +mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible; +mxVertexHandler.prototype.isCustomHandleVisible=function(u){return u.tableHandle||la.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var u=0;this.graph.isTableRow(this.state.cell)?u=1:this.graph.isTableCell(this.state.cell)&&(u=2);return u};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())}; +var V=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var u=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(Pa,Ea,Aa){for(var Ba=[],Ta=0;Ta');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,''); @@ -2915,7 +2915,7 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl function(u,z){na.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1L||Math.abs(G)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(u,A),this.isSpaceEvent(z)?(u=this.x+this.width,A=this.y+this.height,C=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/C)*C,this.height=this.graph.snap(this.height/C)*C,this.graph.isGridEnabled()|| (this.width=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&& @@ -2967,8 +2967,8 @@ Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged", this.update);a.addListener("darkModeChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;aP?T.width=84:0Y?84:Y),T.width=P)});var F=this.addGeometryHandler(k,function(T,P,Y){var fa="SHAPE"===Y.getAttribute("type");e.isTableCell(Y)&&(Y=e.model.getParent(Y));if(e.isTableRow(Y))return e.setTableRowHeight(Y,P-T.height),!0;!fa&&0P?T.height=84:0Y?84:Y),T.height=P)});(d.resizable||d.row|| -d.cell)&&a.appendChild(m);var I=this.createPanel("ArrangePanel-addGeometry-2");I.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));I.appendChild(n);var E=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(I,this.getUnit(),16,52,function(){ca.apply(this, -arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var Q=e.getCellGeometry(d.vertices[0]);null!=Q&&Q.relative&&(mxUtils.br(I),n=document.createElement("div"),n.style.position="absolute",n.style.width="70px",n.style.marginTop="0px",mxUtils.write(n,mxResources.get("relative")),I.appendChild(n),this.addGenericInput(I,"%",87,52,function(){return Math.round(1E3*Q.x)/10},function(T){T=parseFloat(T);if(!isNaN(T)){g.beginUpdate(); -try{Q=Q.clone(),Q.x=parseFloat(T)/100,g.setGeometry(d.vertices[0],Q)}finally{g.endUpdate()}}}),this.addGenericInput(I,"%",16,52,function(){return Math.round(1E3*Q.y)/10},function(T){T=parseFloat(T);if(!isNaN(T)){g.beginUpdate();try{Q=Q.clone(),Q.y=parseFloat(T)/100,g.setGeometry(d.vertices[0],Q)}finally{g.endUpdate()}}}),mxUtils.br(I))}a.appendChild(I)}this.addLabel(I,mxResources.get("left"),87).style.marginTop="8px";this.addLabel(I,mxResources.get("top"),16).style.marginTop="8px";var U=mxUtils.bind(this, -function(T,P,Y){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)m.style.display="none";else{m.style.display="";if(Y||document.activeElement!=t)t.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){I.style.display="";if(Y||document.activeElement!=E)E.value= -this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(Y||document.activeElement!=O)O.value=this.inUnit(d.y)+(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(E,U);this.addKeyHandler(O,U);g.addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){g.removeListener(U)}});U();var S=this.addGeometryHandler(E,function(T,P){P=b.fromUnit(P);T.relative?T.offset.x=P:T.x=P});var ca=this.addGeometryHandler(O,function(T,P){P=b.fromUnit(P);T.relative?T.offset.y=P:T.y=P}); -d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(Q=e.getCellGeometry(d.vertices[0]),null!=Q&&Q.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(T){g.beginUpdate();try{Q=Q.clone(),Q.x=0,Q.y=0,Q.offset=new mxPoint,g.setGeometry(d.vertices[0],Q)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="134px",n.style.left="89px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))), +"right";var x=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?q.style.visibility="hidden":m.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(t,U);this.addKeyHandler(k,U);var D=this.addGeometryHandler(t,function(R,P,X){var Z="SHAPE"===X.getAttribute("type");if(e.isTableCell(X))return e.setTableColumnWidth(X,P-R.width,!0),!0;!Z&&0P?R.width=84:0X?84:X),R.width=P)});var F=this.addGeometryHandler(k,function(R,P,X){var Z="SHAPE"===X.getAttribute("type");e.isTableCell(X)&&(X=e.model.getParent(X));if(e.isTableRow(X))return e.setTableRowHeight(X,P-R.height),!0;!Z&&0P?R.height=84:0X?84:X),R.height=P)});(d.resizable||d.row||d.cell)&& +a.appendChild(m);var I=this.createPanel("ArrangePanel-addGeometry-2");I.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));I.appendChild(n);var E=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(I,this.getUnit(),16,52,function(){ba.apply(this,arguments)}, +this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var T=e.getCellGeometry(d.vertices[0]);null!=T&&T.relative&&(mxUtils.br(I),n=document.createElement("div"),n.style.position="absolute",n.style.width="70px",n.style.marginTop="0px",mxUtils.write(n,mxResources.get("relative")),I.appendChild(n),this.addGenericInput(I,"%",87,52,function(){return Math.round(1E3*T.x)/10},function(R){R=parseFloat(R);if(!isNaN(R)){g.beginUpdate();try{T= +T.clone(),T.x=parseFloat(R)/100,g.setGeometry(d.vertices[0],T)}finally{g.endUpdate()}}}),this.addGenericInput(I,"%",16,52,function(){return Math.round(1E3*T.y)/10},function(R){R=parseFloat(R);if(!isNaN(R)){g.beginUpdate();try{T=T.clone(),T.y=parseFloat(R)/100,g.setGeometry(d.vertices[0],T)}finally{g.endUpdate()}}}),mxUtils.br(I))}a.appendChild(I)}this.addLabel(I,mxResources.get("left"),87).style.marginTop="8px";this.addLabel(I,mxResources.get("top"),16).style.marginTop="8px";var U=mxUtils.bind(this, +function(R,P,X){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)m.style.display="none";else{m.style.display="";if(X||document.activeElement!=t)t.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(X||document.activeElement!=k)k.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){I.style.display="";if(X||document.activeElement!=E)E.value= +this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(X||document.activeElement!=O)O.value=this.inUnit(d.y)+(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(E,U);this.addKeyHandler(O,U);g.addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){g.removeListener(U)}});U();var S=this.addGeometryHandler(E,function(R,P){P=b.fromUnit(P);R.relative?R.offset.x=P:R.x=P});var ba=this.addGeometryHandler(O,function(R,P){P=b.fromUnit(P);R.relative?R.offset.y=P:R.y=P}); +d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(T=e.getCellGeometry(d.vertices[0]),null!=T&&T.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(R){g.beginUpdate();try{T=T.clone(),T.x=0,T.y=0,T.offset=new mxPoint,g.setGeometry(d.vertices[0],T)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="134px",n.style.left="89px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))), a.appendChild(I))}; ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var t=parseFloat(a.value);if(isNaN(t))a.value=d+" "+m.getUnit();else if(t!=d){g.getModel().beginUpdate();try{for(var k=e.getSelectionState().cells,q=0;q"),Ka=[e.cellEditor.textarea.firstChild]);for(var Ha=0;HaB;B++)(function(ha){mxEvent.addListener(k[ha],"click",function(){b(k[ha],""==k[ha].style.backgroundImage)})})(B);var Ia=mxUtils.bind(this,function(ha,Da,Ka){var Ha=f.editor.graph;g=f.getSelectionState();ha=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE, +"0px";q=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=R&&e.insertColumn(R,null!=P?P.cellIndex:0)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=R&&e.insertColumn(R,null!=P?P.cellIndex+1:-1)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn", +mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=R&&null!=P&&e.deleteColumn(R,P.cellIndex)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=R&&null!=X&&e.insertRow(R,X.sectionRowIndex)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!= +R&&null!=X&&e.insertRow(R,X.sectionRowIndex+1)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=R&&null!=X&&e.deleteRow(R,X.sectionRowIndex)}catch(ha){this.editorUi.handleError(ha)}}),n)];this.styleButtons(q);q[2].style.marginRight="10px";m=this.createPanel("TextFormatPanel-addFont-colorPanel-wrapper3");m.style.paddingTop="10px";m.style.paddingBottom="10px";m.appendChild(this.createTitle(mxResources.get("table"))); +m.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";q=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(ha){if(null!=R){var Da=R.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(Ka,Ha,La,Ma){return"#"+("0"+Number(Ha).toString(16)).substr(-2)+("0"+Number(La).toString(16)).substr(-2)+("0"+Number(Ma).toString(16)).substr(-2)});this.editorUi.pickColor(Da,function(Ka){var Ha=null==P||null!=ha&& +mxEvent.isShiftDown(ha)?R:P;e.processElements(Ha,function(La){La.style.border=null});null==Ka||Ka==mxConstants.NONE?(Ha.removeAttribute("border"),Ha.style.border="",Ha.style.borderCollapse=""):(Ha.setAttribute("border","1"),Ha.style.border="1px solid "+Ka,Ha.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ha){if(null!=R){var Da=R.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g, +function(Ka,Ha,La,Ma){return"#"+("0"+Number(Ha).toString(16)).substr(-2)+("0"+Number(La).toString(16)).substr(-2)+("0"+Number(Ma).toString(16)).substr(-2)});this.editorUi.pickColor(Da,function(Ka){var Ha=null==P||null!=ha&&mxEvent.isShiftDown(ha)?R:P;e.processElements(Ha,function(La){La.style.backgroundColor=null});Ha.style.backgroundColor=null==Ka||Ka==mxConstants.NONE?"":Ka})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=R){var ha=R.getAttribute("cellPadding")|| +0;ha=new FilenameDialog(f,ha,mxResources.get("apply"),mxUtils.bind(this,function(Da){null!=Da&&0B;B++)(function(ha){mxEvent.addListener(k[ha],"click",function(){b(k[ha],""==k[ha].style.backgroundImage)})})(B);var Ia=mxUtils.bind(this,function(ha,Da,Ka){var Ha=f.editor.graph;g=f.getSelectionState();ha=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE, 0);b(k[0],(ha&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(k[1],(ha&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(k[2],(ha&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);t.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);if(Ka||document.activeElement!=J)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),J.value=isNaN(ha)?"":ha+" pt";ha=g.cells.filter(function(La){return"SHAPE"=== -La.getAttribute("type")});0!==ha.length&&ha.map(function(La){return Ha.getCellStyle(La)}).forEach(function(La){var Ma=mxUtils.getValue(La,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(D,Ma==mxConstants.ALIGN_LEFT);b(F,Ma==mxConstants.ALIGN_CENTER);b(I,Ma==mxConstants.ALIGN_RIGHT);La=mxUtils.getValue(La,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,La==mxConstants.ALIGN_TOP);b(Q,La==mxConstants.ALIGN_MIDDLE);b(U,La==mxConstants.ALIGN_BOTTOM)});ha=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION, -mxConstants.ALIGN_CENTER);Da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);X.value=ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_TOP?"topLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_TOP?"top":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_TOP?"topRight":ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_BOTTOM?"bottomLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_BOTTOM?"bottom":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_BOTTOM? -"bottomRight":ha==mxConstants.ALIGN_LEFT?"left":ha==mxConstants.ALIGN_RIGHT?"right":"center";if(Ka||document.activeElement!=ba)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),ba.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=K)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),K.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=Fa)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Fa.value=isNaN(ha)?"":ha+" pt"; -if(Ka||document.activeElement!=na)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),na.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=ia)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ia.value=isNaN(ha)?"":ha+" pt"});var Ja=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");var ta=this.installInputHandler(K,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Ca=this.installInputHandler(Fa,mxConstants.STYLE_SPACING_RIGHT, -0,-999,999," pt");var qa=this.installInputHandler(na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var Ga=this.installInputHandler(ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ia);this.addKeyHandler(ba,Ia);this.addKeyHandler(K,Ia);this.addKeyHandler(Fa,Ia);this.addKeyHandler(na,Ia);this.addKeyHandler(ia,Ia);e.getModel().addListener(mxEvent.CHANGE,Ia);this.listeners.push({destroy:function(){e.getModel().removeListener(Ia)}});Ia();if(e.cellEditor.isContentEditing()){var Ya= +La.getAttribute("type")});0!==ha.length&&ha.map(function(La){return Ha.getCellStyle(La)}).forEach(function(La){var Ma=mxUtils.getValue(La,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(D,Ma==mxConstants.ALIGN_LEFT);b(F,Ma==mxConstants.ALIGN_CENTER);b(I,Ma==mxConstants.ALIGN_RIGHT);La=mxUtils.getValue(La,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,La==mxConstants.ALIGN_TOP);b(T,La==mxConstants.ALIGN_MIDDLE);b(U,La==mxConstants.ALIGN_BOTTOM)});ha=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION, +mxConstants.ALIGN_CENTER);Da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);da.value=ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_TOP?"topLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_TOP?"top":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_TOP?"topRight":ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_BOTTOM?"bottomLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_BOTTOM?"bottom":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_BOTTOM? +"bottomRight":ha==mxConstants.ALIGN_LEFT?"left":ha==mxConstants.ALIGN_RIGHT?"right":"center";if(Ka||document.activeElement!=ca)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),ca.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=K)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),K.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=Fa)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Fa.value=isNaN(ha)?"":ha+" pt"; +if(Ka||document.activeElement!=na)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),na.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=ia)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ia.value=isNaN(ha)?"":ha+" pt"});var Ja=this.installInputHandler(ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var ta=this.installInputHandler(K,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Ca=this.installInputHandler(Fa,mxConstants.STYLE_SPACING_RIGHT, +0,-999,999," pt");var qa=this.installInputHandler(na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var Ga=this.installInputHandler(ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ia);this.addKeyHandler(ca,Ia);this.addKeyHandler(K,Ia);this.addKeyHandler(Fa,Ia);this.addKeyHandler(na,Ia);this.addKeyHandler(ia,Ia);e.getModel().addListener(mxEvent.CHANGE,Ia);this.listeners.push({destroy:function(){e.getModel().removeListener(Ia)}});Ia();if(e.cellEditor.isContentEditing()){var Ya= !1;d=function(){Ya||(Ya=!0,window.setTimeout(function(){var ha=e.getSelectedEditingElement();if(null!=ha){var Da=function(C,G){if(null!=C&&null!=G){if(C==G)return!0;if(C.length>G.length+1)return C.substring(C.length-G.length-1,C.length)=="-"+G}return!1},Ka=function(C){if(null!=e.getParentByName(ha,C,e.cellEditor.textarea))return!0;for(var G=ha;null!=G&&1==G.childNodes.length;)if(G=G.childNodes[0],G.nodeName==C)return!0;return!1},Ha=function(C){C=null!=C?C.fontSize:null;return null!=C&&"px"==C.substring(C.length- 2)?parseFloat(C):mxConstants.DEFAULT_FONTSIZE},La=function(C,G,L){return null!=L.style&&null!=G?(G=G.lineHeight,null!=L.style.lineHeight&&"%"==L.style.lineHeight.substring(L.style.lineHeight.length-1)?parseInt(L.style.lineHeight)/100:"px"==G.substring(G.length-2)?parseFloat(G)/C:parseInt(G)):""},Ma=mxUtils.getCurrentStyle(ha),Za=Ha(Ma),eb=La(Za,Ma,ha),$a=ha.getElementsByTagName("*");if(0<$a.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),z=0;z<$a.length;z++)if(u.containsNode($a[z], -!0)){temp=mxUtils.getCurrentStyle($a[z]);Za=Math.max(Ha(temp),Za);var A=La(Za,temp,$a[z]);if(A!=eb||isNaN(A))eb=""}null!=Ma&&(b(k[0],"bold"==Ma.fontWeight||400Q&&(m=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},k=document.createElement("div"),k.style.className="geAdaptiveAsset",k.style.position="absolute",k.style.left="0px",k.style.top="0px",k.style.bottom= -"0px",k.style.width="24px",k.style.height="24px",k.style.margin="0px",k.style.cursor="pointer",k.style.opacity="0.5",k.style.backgroundRepeat="no-repeat",k.style.backgroundPosition="center center",k.style.backgroundSize="24px 24px",k.style.backgroundImage="url("+Editor.previousImage+")",q=k.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",d.appendChild(k),d.appendChild(q),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){ca(mxUtils.mod(this.format.currentStylePage- -1,Q))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){ca(mxUtils.mod(this.format.currentStylePage+1,Q))})),m(k),m(q))}else S();return a}; +mxUtils.bind(this,function(){return this.format.curved}),mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(m);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var Z=f.getVerticesAndEdges();e.beginUpdate();try{for(var da=0;daT&&(m=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},k=document.createElement("div"),k.style.className="geAdaptiveAsset",k.style.position="absolute", +k.style.left="0px",k.style.top="0px",k.style.bottom="0px",k.style.width="24px",k.style.height="24px",k.style.margin="0px",k.style.cursor="pointer",k.style.opacity="0.5",k.style.backgroundRepeat="no-repeat",k.style.backgroundPosition="center center",k.style.backgroundSize="24px 24px",k.style.backgroundImage="url("+Editor.previousImage+")",q=k.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",d.appendChild(k),d.appendChild(q),mxEvent.addListener(k, +"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage-1,T))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage+1,T))})),m(k),m(q))}else S();return a}; DiagramStylePanel.prototype.addResetButton=function(a){var b=this.editorUi,f=b.editor.graph,e=f.model,g=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(d){d=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c- this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=r(c-this.lastX)*l/w;r=r(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;vw+y?c.y=r.y:c.x=r.x);return mxUtils.getPerimeterPoint(H,c,r)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,r,l){var p="0"!=mxUtils.getValue(h.style, "fixedSize","0"),v=p?S.prototype.fixedSize:S.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,aa=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,H+aa),new mxPoint(w,H+aa),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_WEST? @@ -3298,9 +3298,9 @@ h,p),new mxPoint(l-h,v),new mxPoint(h,v),new mxPoint(h,p)],this.isRounded,w,!0); 2*h,p/2,l,p);c.lineTo(h,p);c.quadTo(h-2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,r,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,r,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",C);mxUtils.extend(G, mxActor);G.prototype.size=20;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,h,r,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(L, mxActor);L.prototype.size=.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,r,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(W,mxEllipse); -W.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,r+p);c.lineTo(h+l,r+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,r);c.lineTo(h+l/2,r+p);c.end();c.stroke()}; -mxCellRenderer.registerShape("orEllipse",ea);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,r+.145*p);c.lineTo(h+.855*l,r+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,r+.145*p);c.lineTo(h+.145*l,r+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(da,mxRhombus);da.prototype.paintVertexShape=function(c,h,r,l,p){mxRhombus.prototype.paintVertexShape.apply(this, -arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",da);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,h,r,l,p){c.begin();c.moveTo(h,r);c.lineTo(h+l,r);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,r+p);c.lineTo(h+l,r+p);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape= +W.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,r+p);c.lineTo(h+l,r+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,r);c.lineTo(h+l/2,r+p);c.end();c.stroke()}; +mxCellRenderer.registerShape("orEllipse",fa);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,r+.145*p);c.lineTo(h+.855*l,r+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,r+.145*p);c.lineTo(h+.145*l,r+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",Y);mxUtils.extend(ea,mxRhombus);ea.prototype.paintVertexShape=function(c,h,r,l,p){mxRhombus.prototype.paintVertexShape.apply(this, +arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ea);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,h,r,l,p){c.begin();c.moveTo(h,r);c.lineTo(h+l,r);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,r+p);c.lineTo(h+l,r+p);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape= function(c,h,r,l,p){var v=c.state.strokeWidth/2,w=10+2*v,H=r+p-w/2;c.begin();c.moveTo(h,r);c.lineTo(h,r+p);c.moveTo(h+v,H);c.lineTo(h+v+w,H-w/2);c.moveTo(h+v,H);c.lineTo(h+v+w,H+w/2);c.moveTo(h+v,H);c.lineTo(h+l-v,H);c.moveTo(h+l,r);c.lineTo(h+l,r+p);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H-w/2);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Qa,mxEllipse);Qa.prototype.drawHidden=!0;Qa.prototype.paintVertexShape=function(c,h,r, l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),aa="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||H||aa||M||y?(c.rect(h,r,l,p),c.fill(),c.pointerEvents= v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,r),this.outline||H?c.lineTo(h+l,r):c.moveTo(h+l,r),this.outline||aa?c.lineTo(h+l,r+p):c.moveTo(h+l,r+p),this.outline||M?c.lineTo(h,r+p):c.moveTo(h,r+p),(this.outline||y)&&c.lineTo(h,r),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Qa);mxUtils.extend(Ra,mxEllipse);Ra.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this, @@ -3386,64 +3386,64 @@ mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(gb(c,r/2))}h. mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=c.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],H=0;H=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, -.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints= -mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1, -null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5, -0),!1));return c};E.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),r));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-l)));return c};B.prototype.getConstraints=function(c,h,r){c=[];h=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5, -1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1, -0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};F.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style, -"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,h,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};La.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints= -mxEllipse.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Pa.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(c,h,r){c=[];var l=Math.min(h,r/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r));return c};Ca.prototype.getConstraints=function(c,h,r){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c, -"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),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, -h),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(r-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(r-.5*c,3.5*c))];r>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));r>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));r> -15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;L.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)];K.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)];qa.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)];D.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25, -1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5, -1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0), -new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];U.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +[Wa(c,["size","position"],function(r){var l=Math.max(0,Math.min(r.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));mxUtils.getValue(this.state.style,"base",da.prototype.base);return new mxPoint(r.x+p*r.width,r.y+r.height-l)},function(r,l){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(r.height,r.y+r.height-l.y)));this.state.style.position= +Math.round(100*Math.max(0,Math.min(1,(l.x-r.x)/r.width)))/100},!1),Wa(c,["position2"],function(r){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(r.x+l*r.width,r.y+r.height)},function(r,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-r.x)/r.width)))/100},!1),Wa(c,["base"],function(r){var l=Math.max(0,Math.min(r.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),p=Math.max(0,Math.min(1, +mxUtils.getValue(this.state.style,"position",da.prototype.position))),v=Math.max(0,Math.min(r.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(r.x+Math.min(r.width,p*r.width+v),r.y+r.height-l)},function(r,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(r.width,l.x-r.x-p*r.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(c)); +return h},internalStorage:function(c){var h=[Wa(c,["dx","dy"],function(r){var l=Math.max(0,Math.min(r.width,mxUtils.getValue(this.state.style,"dx",La.prototype.dx))),p=Math.max(0,Math.min(r.height,mxUtils.getValue(this.state.style,"dy",La.prototype.dy)));return new mxPoint(r.x+l,r.y+p)},function(r,l){this.state.style.dx=Math.round(Math.max(0,Math.min(r.width,l.x-r.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(r.height,l.y-r.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&& +h.push(gb(c));return h},module:function(c){return[Wa(c,["jettyWidth","jettyHeight"],function(h){var r=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Ca.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",Ca.prototype.jettyHeight)));return new mxPoint(h.x+r/2,h.y+2*l)},function(h,r){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,r.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height, +r.y-h.y))/2)})]},corner:function(c){return[Wa(c,["dx","dy"],function(h){var r=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Ma.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Ma.prototype.dy)));return new mxPoint(h.x+r,h.y+l)},function(h,r){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,r.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,r.y-h.y)))},!1)]},tee:function(c){return[Wa(c,["dx","dy"],function(h){var r= +Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(h.x+(h.width+r)/2,h.y+l)},function(h,r){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,r.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,r.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),"mxgraph.arrows2.wedgeArrow":hb(20,20),"mxgraph.arrows2.wedgeArrowDashed":hb(20, +20),"mxgraph.arrows2.wedgeArrowDashed2":hb(20,20),folder:function(c){return[Wa(c,["tabWidth","tabHeight"],function(h){var r=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(r=h.width-r);return new mxPoint(h.x+r,h.y+l)},function(h,r){var l=Math.max(0,Math.min(h.width, +r.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,r.y-h.y)))},!1)]},document:function(c){return[Wa(c,["size"],function(h){var r=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-r)*h.height)},function(h,r){this.state.style.size=Math.max(0, +Math.min(1,(h.y+h.height-r.y)/h.height))},!1)]},tape:function(c){return[Wa(c,["size"],function(h){var r=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+r*h.height/2)},function(h,r){this.state.style.size=Math.max(0,Math.min(1,(r.y-h.y)/h.height*2))},!1)]},isoCube2:function(c){return[Wa(c,["isoAngle"],function(h){var r=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",q.isoAngle))))*Math.PI/ +200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(r),.5*h.height))},function(h,r){this.state.style.isoAngle=Math.max(0,50*(r.y-h.y)/h.height)},!0)]},cylinder2:bb(x.prototype.size),cylinder3:bb(B.prototype.size),offPageConnector:function(c){return[Wa(c,["size"],function(h){var r=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-r)*h.height)},function(h,r){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height- +r.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(r){var l=Math.max(0,Math.min(r.width/2,r.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(r.x+l,r.y+l)},function(r,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(r.height/2,r.width/2,l.x-r.x)))/100})];c=Graph.createHandle(c,["indent"],function(r){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2)))); +return new mxPoint(r.x+.75*r.width,r.y+l*r.height/200)},function(r,l){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(l.y-r.y)/r.height)))/100});h.push(c);return h},step:qb(la.prototype.size,!0,null,!0,la.prototype.fixedSize),hexagon:qb(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:qb(ba.prototype.size,!1),display:qb(Aa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,E.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,S.prototype.size, +S.prototype.fixedSize),parallelogram:ub(1,U.prototype.size,U.prototype.fixedSize)};Graph.createHandle=Wa;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&& +(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(c=null==c?h:c.concat(h)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory= +{};var jb=new mxPoint(1,0),kb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);jb=mxUtils.getRotatedPoint(jb,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(ob),Math.sin(ob));mxEdgeStyle.IsometricConnector=function(c,h,r,l,p){var v=c.view;l=null!=l&&0=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1, +0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0), +new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Qa.prototype.constraints=mxRectangleShape.prototype.constraints; +mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};E.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style, +"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(h+l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-l)));return c};B.prototype.getConstraints=function(c,h,r){c=[];h=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1, +0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};F.prototype.getConstraints= +function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,h,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};La.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints; +Y.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints=mxEllipse.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Pa.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(c,h,r){c=[];var l=Math.min(h,r/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r));return c};Ca.prototype.getConstraints=function(c,h,r){h=parseFloat(mxUtils.getValue(c, +"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),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,h),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(r-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(r-.5*c,3.5*c))];r>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));r>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1,null,h));r>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;L.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)];K.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)];qa.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)];D.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, +.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, +.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1, +.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];U.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;eb.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style, "dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(h+l),.5*(r+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),r));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(r+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0, @@ -3466,8 +3466,8 @@ this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.op ": "+B.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=m;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=m;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=m;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(e);e.showDialog(k.container, 620,420,!0,!1);k.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=m;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN? Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var k=null;try{k=e.copyXml(),null!=k&&d.removeCells(k,!1)}catch(q){}null==k&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){e.handleError(k)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(q){if(null!= -q){d.getModel().beginUpdate();try{e.pasteXml(q,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),k=!0)}catch(q){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function q(B){if(null!=B){for(var D=0;Dk.length||(1===k.length?(k=d.getCellStyle(k[0]).style,parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}],mxStyle:k||"ICON",event:"setCentreonStyle"}),"*")):parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}],mxStyle:"ICON",event:"setCentreonStyle"}),"*"))}},null,null,Editor.ctrlKey+"+E");this.addAction("createMapFromContainer", @@ -3522,9 +3522,9 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function d.getModel().getParent(k),F=d.getCellGeometry(k);D=Math.round(d.snap(d.popupMenuHandler.triggerX/B-D));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));q.addPointAt(q.state,D,B)}}});this.addAction("removeWaypoint",function(){var k=e.actions.get("removeWaypoint");null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction("clearWaypoints",function(k,q){k=null!=q?q:k;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var B= 0;B"];for(var U=0;U");for(var S=0;S
");O.push("")}O.push("");F=O.join("");Q.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(Q=F.length-1;0<=Q;Q--)if(0==Q||F[Q]!=D[Q-1]){E.selectNode(F[Q].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,m=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", +Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){m=d.getParentByName(n,"TR");var I=mxEvent.isMouseEvent(D)?2:4,E=x,O=Math.min(20,m.sectionRowIndex+I);I=Math.min(20,n.cellIndex+I);for(var T=E.rows.length;T"];for(var U=0;U");for(var S=0;S
");O.push("")}O.push("");F=O.join("");T.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(T=F.length-1;0<=T;T--)if(0==T||F[T]!=D[T-1]){E.selectNode(F[T].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,m=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";f=a.getElementsByTagName("td");1d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu(); d.destroy()});var t=mxUtils.getOffset(a);d.popup(t.x,t.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}m=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){m=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var I=m.value;/(^#?[a-zA-Z0-9]*$)/.test(I)? ("none"!=I&&"#"!=I.charAt(0)&&(I="#"+I),ColorDialog.addRecentColor("none"!=I?I.substring(1):I,12),n(I),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var I=q(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);I.style.marginBottom="8px";return I}this.editorUi=a;var m=document.createElement("input");m.style.marginBottom="10px";mxClient.IS_IE&&(m.style.marginTop="10px",document.body.appendChild(m));var n=null!=f?f:this.createApplyFunction(); -this.init=function(){mxClient.IS_TOUCH||m.focus()};var t=new mxJSColor.color(m);t.pickerOnfocus=!1;t.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var k=document.createElement("center"),q=mxUtils.bind(this,function(I,E,O,Q){E=null!=E?E:12;var U=document.createElement("table");U.style.borderCollapse= -"collapse";U.setAttribute("cellspacing","0");U.style.marginBottom="20px";U.style.cellSpacing="0px";U.style.marginLeft="1px";var S=document.createElement("tbody");U.appendChild(S);for(var ca=I.length/E,T=0;TMAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,m=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var t=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var q=document.createElement("input");q.setAttribute("value",a.editor.getOrCreateFilename());q.style.width="180px";k=document.createElement("td");k.appendChild(q);g.appendChild(k); t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var x=document.createElement("select");x.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));x.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),x.appendChild(k)); @@ -3683,53 +3683,53 @@ k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResourc "180px";k=document.createElement("td");k.appendChild(F);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var I=document.createElement("select");I.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");I.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");I.appendChild(k); k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");I.appendChild(k);k=document.createElement("option");k.setAttribute("value","400");mxUtils.write(k,"400dpi");I.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));I.appendChild(k);var E=document.createElement("input");E.style.width="180px";E.style.display="none";E.setAttribute("value","100");E.setAttribute("type","number");E.setAttribute("min", "50");E.setAttribute("step","50");var O=!1;mxEvent.addListener(I,"change",function(){"custom"==this.value?(this.style.display="none",E.style.display="",E.focus()):(E.value=this.value,O||(B.value=this.value))});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value);isNaN(P)||0>=P?E.style.backgroundColor="red":(E.style.backgroundColor="",O||(B.value=P))});k=document.createElement("td");k.appendChild(I);k.appendChild(E);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td"); -k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(Q);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k); +k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(T);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k); var U=document.createElement("input");U.setAttribute("type","checkbox");U.checked=!1;k=document.createElement("td");k.appendChild(U);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("value",ExportDialog.lastBorderValue);S.style.width="180px";k=document.createElement("td");k.appendChild(S); g.appendChild(k);t.appendChild(g);d.appendChild(t);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){O=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=q.value,Y=x.value,fa=Math.max(0,parseFloat(B.value)|| -100)/100,X=Math.max(0,parseInt(S.value)),la=e.background,J=Math.max(1,parseInt(E.value));if(("svg"==Y||"png"==Y||"pdf"==Y)&&Q.checked)la=null;else if(null==la||la==mxConstants.NONE)la="#ffffff";ExportDialog.lastBorderValue=X;ExportDialog.exportFile(a,P,Y,la,fa,X,J,U.checked)}}));ca.className="geBtn gePrimaryBtn";var T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});T.className="geBtn";a.editor.cancelFirst?(k.appendChild(T),k.appendChild(ca)):(k.appendChild(ca),k.appendChild(T)); +"change",function(){var P=parseInt(F.value)/n;0=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=q.value,X=x.value,Z=Math.max(0,parseFloat(B.value)||100)/ +100,da=Math.max(0,parseInt(S.value)),la=e.background,J=Math.max(1,parseInt(E.value));if(("svg"==X||"png"==X||"pdf"==X)&&T.checked)la=null;else if(null==la||la==mxConstants.NONE)la="#ffffff";ExportDialog.lastBorderValue=da;ExportDialog.exportFile(a,P,X,la,Z,da,J,U.checked)}}));ba.className="geBtn gePrimaryBtn";var R=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});R.className="geBtn";a.editor.cancelFirst?(k.appendChild(R),k.appendChild(ba)):(k.appendChild(ba),k.appendChild(R)); g.appendChild(k);t.appendChild(g);d.appendChild(t);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,f,e,g,d,m,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var t=n.getGraphBounds(),k=mxUtils.createXmlDocument(),q=k.createElement("output");k.appendChild(q);k=new mxXmlCanvas2D(q);k.translate(Math.floor((d/g-t.x)/n.view.scale),Math.floor((d/g-t.y)/n.view.scale));k.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), k);q="xml="+encodeURIComponent(mxUtils.getXml(q));k=Math.ceil(t.width*g/n.view.scale+2*d);g=Math.ceil(t.height*g/n.view.scale+2*d);q.length<=MAX_REQUEST_SIZE&&k*gP.name?1:0});if(null!=F){q=document.createElement("div");q.style.width= -"100%";q.style.fontSize="11px";q.style.textAlign="center";mxUtils.write(q,F);var Q=k.addField(mxResources.get("id")+":",q);mxEvent.addListener(q,"dblclick",function(T){mxEvent.isShiftDown(T)&&(T=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0T.indexOf(":"))try{var P= -mxUtils.indexOf(x,T);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(T,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(T);var Y=k.addTextarea(T+":","",2);Y.style.width="100%";B.push(Y);I(Y,T);Y.focus()}S.setAttribute("disabled","disabled");U.value=""}catch(fa){mxUtils.alert(fa)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(U,"keypress",function(T){13==T.keyCode&&S.click()});this.init=function(){0P.name?1:0});if(null!=F){q=document.createElement("div");q.style.width= +"100%";q.style.fontSize="11px";q.style.textAlign="center";mxUtils.write(q,F);var T=k.addField(mxResources.get("id")+":",q);mxEvent.addListener(q,"dblclick",function(R){mxEvent.isShiftDown(R)&&(R=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0R.indexOf(":"))try{var P= +mxUtils.indexOf(x,R);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(R,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(R);var X=k.addTextarea(R+":","",2);X.style.width="100%";B.push(X);I(X,R);X.focus()}S.setAttribute("disabled","disabled");U.value=""}catch(Z){mxUtils.alert(Z)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(U,"keypress",function(R){13==R.keyCode&&S.click()});this.init=function(){0")});mxEvent.addListener(R,"dragend",function(na){null!=B&&null!=D&&t.addCell(V,t.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width= -"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(t.model.isVisible(V)?"hide":"show"));t.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(R,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(R,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");K.appendChild(ba);mxEvent.addListener(ba,"click",function(na){t.model.setVisible(V,!t.model.isVisible(V));mxEvent.consume(na)}); -ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var ia=t.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter= -"invert(100%)");t.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(na){if(t.isEnabled()){var Fa=null;t.getModel().beginUpdate();try{Fa="1"==mxUtils.getValue(ia,"locked","0")?null:"1",t.setCellStyles("locked",Fa,[V])}finally{t.getModel().endUpdate()}"1"==Fa&&t.removeSelectionCells(t.getModel().getDescendants(V));mxEvent.consume(na)}});K.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,J);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow= -"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";K.appendChild(ba);R.appendChild(K);if(t.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)J=document.createElement("div"),J.style.display="block",J.style.textAlign="right",J.style.whiteSpace="nowrap",J.style.position="absolute",J.style.right="16px",J.style.top="6px",0")});mxEvent.addListener(Q,"dragend",function(na){null!=B&&null!=D&&t.addCell(V,t.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var ca=document.createElement("img");ca.setAttribute("draggable","false");ca.setAttribute("align","top");ca.setAttribute("border","0");ca.style.width= +"16px";ca.style.padding="0px 6px 0 4px";ca.style.marginTop="2px";ca.style.cursor="pointer";ca.setAttribute("title",mxResources.get(t.model.isVisible(V)?"hide":"show"));t.model.isVisible(V)?(ca.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(Q,75)):(ca.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(Q,25));Editor.isDarkMode()&&(ca.style.filter="invert(100%)");K.appendChild(ca);mxEvent.addListener(ca,"click",function(na){t.model.setVisible(V,!t.model.isVisible(V));mxEvent.consume(na)}); +ca=document.createElement("img");ca.setAttribute("draggable","false");ca.setAttribute("align","top");ca.setAttribute("border","0");ca.style.width="16px";ca.style.padding="0px 6px 0 0";ca.style.marginTop="2px";ca.setAttribute("title",mxResources.get("lockUnlock"));var ia=t.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"locked","0")?(ca.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ca,75)):(ca.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ca,25));Editor.isDarkMode()&&(ca.style.filter= +"invert(100%)");t.isEnabled()&&(ca.style.cursor="pointer");mxEvent.addListener(ca,"click",function(na){if(t.isEnabled()){var Fa=null;t.getModel().beginUpdate();try{Fa="1"==mxUtils.getValue(ia,"locked","0")?null:"1",t.setCellStyles("locked",Fa,[V])}finally{t.getModel().endUpdate()}"1"==Fa&&t.removeSelectionCells(t.getModel().getDescendants(V));mxEvent.consume(na)}});K.appendChild(ca);ca=document.createElement("span");mxUtils.write(ca,J);ca.style.display="block";ca.style.whiteSpace="nowrap";ca.style.overflow= +"hidden";ca.style.textOverflow="ellipsis";ca.style.position="absolute";ca.style.left="52px";ca.style.right="8px";ca.style.top="8px";K.appendChild(ca);Q.appendChild(K);if(t.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)J=document.createElement("div"),J.style.display="block",J.style.textAlign="right",J.style.whiteSpace="nowrap",J.style.position="absolute",J.style.right="16px",J.style.top="6px",0Ba.size&&(ra=ra.slice(0, Ba.size));za=ra.join(",");null!=Ba.countProperty&&(ca.setCellStyles(Ba.countProperty,ra.length,ca.getSelectionCells()),ia.push(Ba.countProperty),wa.push(ra.length))}ca.setCellStyles(qa,za,ca.getSelectionCells());ia.push(qa);wa.push(za);if(null!=Ba.dependentProps)for(qa=0;qaza)Ea=Ea.slice(0,za);else for(var da=Ea.length;da 0) { this.container.appendChild(this.addStyles(this.createPanel('StyleFormatPanel-addStyles'))); diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js index e1ff73768d..916e0a0bf1 100644 --- a/src/main/webapp/js/grapheditor/Format.js +++ b/src/main/webapp/js/grapheditor/Format.js @@ -5055,8 +5055,16 @@ StyleFormatPanel.prototype.addStroke = function(container) lineEnd.style.marginLeft = '3px'; lineEnd.style.height = '17px'; - container.appendChild(colorPanel); - container.appendChild(altStylePanel); + + const cells = ss.cells.filter((cell) => { + return graph.getModel().isEdge(cell) && cell.getAttribute('type') === 'LINK' && cell.getAttribute('linkType') !== 'SIMPLE'; + }); + + if(cells.length === 0) + { + container.appendChild(colorPanel); + } + container.appendChild(stylePanel); var arrowPanel = stylePanel.cloneNode(false); @@ -5134,13 +5142,8 @@ StyleFormatPanel.prototype.addStroke = function(container) { perimeterUpdate.apply(this, arguments); }); - - if (ss.edges.length == ss.cells.length) - { - container.appendChild(stylePanel2); - container.appendChild(arrowPanel); - } - else if (ss.vertices.length == ss.cells.length) + + if (ss.vertices.length == ss.cells.length) { container.appendChild(perimeterPanel); } @@ -5255,16 +5258,8 @@ StyleFormatPanel.prototype.addStroke = function(container) } } - if (ss.edges.length == ss.cells.length) - { - altStylePanel.style.display = ''; - stylePanel.style.display = 'none'; - } - else - { - altStylePanel.style.display = 'none'; - stylePanel.style.display = ''; - } + altStylePanel.style.display = 'none'; + stylePanel.style.display = ''; if (Graph.lineJumpsEnabled && ss.edges.length > 0 && ss.vertices.length == 0 && ss.lineJumps) diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js index 283f84cc1f..baa833b66e 100644 --- a/src/main/webapp/js/integrate.min.js +++ b/src/main/webapp/js/integrate.min.js @@ -2046,12 +2046,12 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(m){return!(m instanceof mxChildChange)});if(0U.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), -d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=Q+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!q)){var S=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ca){S=!0}),null,mxUtils.bind(this,function(ca){S&&(a.hideDialog(!0),S=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var ca=k(); -null!=ca&&(B=f=ca.w,D=e=ca.h)}ca=mxUtils.getDocumentSize();E=ca.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((ca.width-f-F)/2));Q=Math.max(1,Math.round((E-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,E-F);ca=this.getPosition(O,Q,f,e);O=ca.x;Q=ca.y;U.style.left=O+"px";U.style.top=Q+"px";U.style.width=f+"px";U.style.height=e+ -"px";!n&&b.clientHeight>U.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Q+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=m;this.container=U;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +function Dialog(a,b,f,e,g,d,m,n,t,k,q){var x=t?57:0,B=f,D=e,F=t?0:64,I=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var E=I.height,O=Math.max(1,Math.round((I.width-f-F)/2)),T=Math.max(1,Math.round((E-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,E-F);0U.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), +d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=T+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!q)){var S=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ba){S=!0}),null,mxUtils.bind(this,function(ba){S&&(a.hideDialog(!0),S=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var ba=k(); +null!=ba&&(B=f=ba.w,D=e=ba.h)}ba=mxUtils.getDocumentSize();E=ba.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((ba.width-f-F)/2));T=Math.max(1,Math.round((E-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,E-F);ba=this.getPosition(O,T,f,e);O=ba.x;T=ba.y;U.style.left=O+"px";U.style.top=T+"px";U.style.width=f+"px";U.style.height=e+ +"px";!n&&b.clientHeight>U.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=T+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=m;this.container=U;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2060,8 +2060,8 @@ Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onD var ErrorDialog=function(a,b,f,e,g,d,m,n,t,k,q){t=null!=t?t:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b= document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=q&&q()}),k.className="geBtn",f.appendChild(k));var D=mxUtils.button(e,function(){t&&a.hideDialog();null!=g&&g()}); D.className="geBtn";f.appendChild(D);null!=m&&(e=mxUtils.button(m,function(){t&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(D){var F=m.checked||k.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var E=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var Q=m.checked?1:parseInt(q.value);isNaN(Q)||(O=mxUtils.getScaleForPageCount(Q,f,E))}f.getGraphBounds();var U=Q=0;E=mxRectangle.fromRectangle(E);E.width=Math.ceil(E.width*I);E.height=Math.ceil(E.height*I);O*=I;!F&&f.pageVisible?(I=f.getPageLayout(),Q-=I.x*E.width,U-=I.y*E.height): -F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,Q,U,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var m=document.createElement("input");m.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(m);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); +PrintDialog.prototype.create=function(a){function b(D){var F=m.checked||k.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var E=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var T=m.checked?1:parseInt(q.value);isNaN(T)||(O=mxUtils.getScaleForPageCount(T,f,E))}f.getGraphBounds();var U=T=0;E=mxRectangle.fromRectangle(E);E.width=Math.ceil(E.width*I);E.height=Math.ceil(E.height*I);O*=I;!F&&f.pageVisible?(I=f.getPageLayout(),T-=I.x*E.width,U-=I.y*E.height): +F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,T,U,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var m=document.createElement("input");m.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(m);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); n.appendChild(t);mxEvent.addListener(t,"click",function(D){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(D)});mxEvent.addListener(m,"change",function(){k.checked=!m.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(k);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");n.appendChild(t);mxEvent.addListener(t, "click",function(D){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(D)});d.appendChild(n);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(q);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(k,"change", function(){k.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");m.checked=!k.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; @@ -2076,23 +2076,23 @@ d.appendChild(m);m=document.createElement("td");var k=document.createElement("bu q.style.width="64px";q.style.cursor="pointer";q.style.padding="4px";var x=f.backgroundImage,B=f.background,D=function(F){a.showBackgroundImageDialog(function(I,E,O){E||(null!=I&&null!=I.src&&Graph.isPageLink(I.src)&&(I={originalSrc:I.src}),x=I);B=O;b()},x,B);mxEvent.consume(F)};mxEvent.addListener(k,"click",D);mxEvent.addListener(q,"click",D);b();m.appendChild(q);m.appendChild(k);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop= "16px";m.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&m.appendChild(k);D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var F=parseInt(t.value);isNaN(F)||f.gridSize===F||f.setGridSize(F);F=new ChangePageSetup(a,B,x,n.get());F.ignoreColor=f.background==B;F.ignoreImage=(null!=f.backgroundImage?f.backgroundImage.src:null)===(null!=x?x.src:null);f.pageFormat.width==F.previousFormat.width&& f.pageFormat.height==F.previousFormat.height&&F.ignoreColor&&F.ignoreImage||f.model.execute(F)});D.className="geBtn gePrimaryBtn";m.appendChild(D);a.editor.cancelFirst||m.appendChild(k);d.appendChild(m);g.appendChild(d);e.appendChild(g);this.container=e}; -PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(ca,T,P){if(P||x!=document.activeElement&&B!=document.activeElement){ca=!1;for(T=0;T=ca)x.value=f.width/100;ca=parseFloat(B.value);if(isNaN(ca)||0>=ca)B.value=f.height/100;ca=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), -Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&m.checked&&(ca=new mxRectangle(0,0,ca.height,ca.width));T&&Q||ca.width==U.width&&ca.height==U.height||(U=ca,null!=e&&e(U))};mxEvent.addListener(b,"click",function(ca){d.checked=!0;S(ca);mxEvent.consume(ca)});mxEvent.addListener(k,"click",function(ca){m.checked=!0;S(ca);mxEvent.consume(ca)});mxEvent.addListener(x,"blur",S);mxEvent.addListener(x,"click",S);mxEvent.addListener(B,"blur",S);mxEvent.addListener(B,"click",S);mxEvent.addListener(m,"change", -S);mxEvent.addListener(d,"change",S);mxEvent.addListener(n,"change",function(ca){Q="custom"==n.value;S(ca,!0)});S();return{set:function(ca){f=ca;g(null,null,!0)},get:function(){return U},widthInput:x,heightInput:B}}; +E.key);mxUtils.write(O,E.title);n.appendChild(O)}var T=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(t);a.appendChild(q);var U=f,S=function(ba,R){ba=D[n.value];null!=ba.format?(x.value=ba.format.width/100,B.value=ba.format.height/100,q.style.display="none",t.style.display=""):(t.style.display="none",q.style.display="");ba=parseFloat(x.value);if(isNaN(ba)||0>=ba)x.value=f.width/100;ba=parseFloat(B.value);if(isNaN(ba)||0>=ba)B.value=f.height/100;ba=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), +Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&m.checked&&(ba=new mxRectangle(0,0,ba.height,ba.width));R&&T||ba.width==U.width&&ba.height==U.height||(U=ba,null!=e&&e(U))};mxEvent.addListener(b,"click",function(ba){d.checked=!0;S(ba);mxEvent.consume(ba)});mxEvent.addListener(k,"click",function(ba){m.checked=!0;S(ba);mxEvent.consume(ba)});mxEvent.addListener(x,"blur",S);mxEvent.addListener(x,"click",S);mxEvent.addListener(B,"blur",S);mxEvent.addListener(B,"click",S);mxEvent.addListener(m,"change", +S);mxEvent.addListener(d,"change",S);mxEvent.addListener(n,"change",function(ba){T="custom"==n.value;S(ba,!0)});S();return{set:function(ba){f=ba;g(null,null,!0)},get:function(){return U},widthInput:x,heightInput:B}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; var FilenameDialog=function(a,b,f,e,g,d,m,n,t,k,q,x,B){t=null!=t?t:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var I=document.createElement("tr");var E=document.createElement("td");E.style.textOverflow="ellipsis";E.style.textAlign="right";E.style.maxWidth=(B?B+15:100)+"px";E.style.fontSize="10pt";E.style.width=(B?B:84)+"px";mxUtils.write(E,(g||mxResources.get("filename"))+":");I.appendChild(E);var O= -document.createElement("input");O.setAttribute("value",b||"");O.style.marginLeft="4px";O.style.width=null!=x?x+"px":"180px";var Q=mxUtils.button(f,function(){if(null==d||d(O.value))t&&a.hideDialog(),e(O.value)});Q.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==m)if(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var U=D.parentNode;if(null!=U){var S=null;mxEvent.addListener(U,"dragleave", -function(ca){null!=S&&(S.style.backgroundColor="",S=null);ca.stopPropagation();ca.preventDefault()});mxEvent.addListener(U,"dragover",mxUtils.bind(this,function(ca){null==S&&(!mxClient.IS_IE||10'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(m,n){a.apply(this,arguments);if(null!=this.shiftPreview1){var t=this.view.canvas;null!=t.ownerSVGElement&&(t=t.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x* this.view.scale+m,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+n,k))+"px";t.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(m,n,t){var k=this.view.scale,q=this.view.translate,x=this.pageFormat,B=k*this.pageScale,D=this.view.getBackgroundPageBounds();n=D.width;t=D.height;var F=new mxRectangle(k*q.x,k*q.y,x.width*B,x.height*B),I=(m=m&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(t/F.height)-1:0,E=m?Math.ceil(n/F.width)-1:0,O=D.x+n, -Q=D.y+t;null==this.horizontalPageBreaks&&0mxUtils.indexOf(d,q[b])&&d.push(q[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(d,m[b])&&d.push(m[b]);var D=function(N,R,K,ba,ia,na,Fa){ba=null!=ba?ba:e.currentVertexStyle;ia=null!=ia?ia:e.currentEdgeStyle;na=null!=na?na:!0;K=null!=K?K:e.getModel();if(Fa){Fa=[];for(var ja=0;jamxUtils.indexOf(n,Ga))&&(La=mxUtils.setStyle(La,Ga,Ma))}Editor.simpleLabels&&(La=mxUtils.setStyle(mxUtils.setStyle(La,"html",null),"whiteSpace",null));K.setStyle(xa,La)}}finally{K.endUpdate()}return N};e.addListener("cellsInserted",function(N,R){D(R.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(N,R){D(R.getProperty("cells"), +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(d,m[b])&&d.push(m[b]);var D=function(N,Q,K,ca,ia,na,Fa){ca=null!=ca?ca:e.currentVertexStyle;ia=null!=ia?ia:e.currentEdgeStyle;na=null!=na?na:!0;K=null!=K?K:e.getModel();if(Fa){Fa=[];for(var ja=0;jamxUtils.indexOf(n,Ga))&&(La=mxUtils.setStyle(La,Ga,Ma))}Editor.simpleLabels&&(La=mxUtils.setStyle(mxUtils.setStyle(La,"html",null),"whiteSpace",null));K.setStyle(xa,La)}}finally{K.endUpdate()}return N};e.addListener("cellsInserted",function(N,Q){D(Q.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(N,Q){D(Q.getProperty("cells"), !0)});this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(N){null==N&&(N=window.event);return e.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown= -F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(N){if(null!=N){var R=mxEvent.getSource(N);if("A"==R.nodeName)for(;null!=R;){if("geHint"==R.className)return!0;R=R.parentNode}}return F(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, -"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var I=e.graphHandler.start;e.graphHandler.start=function(){null!=X.hoverIcons&&X.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, -function(N){var R=mxUtils.getOffset(this.diagramContainer);0document.documentMode)?mxEvent.addListener(this.diagramContainer, +"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var I=e.graphHandler.start;e.graphHandler.start=function(){null!=da.hoverIcons&&da.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, +function(N){var Q=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),R.push(N));N=K}N=this.toolbar.fontMenu;K=this.toolbar.sizeMenu;if(null==Y)this.toolbar.createTextToolbar();else{for(var ba=0;bamxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),Q.push(N));N=K}N=this.toolbar.fontMenu;K=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var ca=0;ca=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2; @@ -2161,7 +2161,7 @@ EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this; a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(t,k){this.isEnabled()&&(null!=k||null==b.sidebar||mxEvent.isShiftDown(t)||a.isCellLocked(a.getDefaultParent()))&&g.apply(this,arguments)};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=function(t, k,q){var x=q.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?m.apply(this,arguments):this.graph.connectVertex(t.cell,k,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var I=a.getCompositeParent(t.cell);B=a.getCellGeometry(I);for(q.consume();null!=I&&a.model.isVertex(I)&&null!=B&&B.relative;)cell=I,I=a.model.getParent(cell),B=a.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(q.getGraphX(),q.getGraphY(),I,mxUtils.bind(this, function(E){F(E);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(E))}),k)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(t,k){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var q=k.getProperty("arrow"),x=k.getProperty("direction"),B=k.getProperty("event");q=q.getBoundingClientRect();var D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+ -q.x-D.x;D=a.container.scrollTop+q.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),E=b.showShapePicker(F,D,I,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(Q,U,S){S(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))},function(Q){a.selectCellsForConnectVertex(Q)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(E,q,F,D,x);mxUtils.setOpacity(E,30);mxEvent.addListener(E,"mouseenter", +q.x-D.x;D=a.container.scrollTop+q.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),E=b.showShapePicker(F,D,I,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(T,U,S){S(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))},function(T){a.selectCellsForConnectVertex(T)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(E,q,F,D,x);mxUtils.setOpacity(E,30);mxEvent.addListener(E,"mouseenter", function(){mxUtils.setOpacity(E,100)});mxEvent.addListener(E,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(t,k){null!=n&&window.clearTimeout(n)}))}}; EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"}; EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d,m){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d,m);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a}; @@ -2187,40 +2187,40 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb 0),B=0;B=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale* -this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==N&&""!=fa.getAttribute("filter")&&(N=fa.getAttribute("filter"),fa.removeAttribute("filter")),J=new mxPoint(a.container.scrollLeft,a.container.scrollTop), -K=ba||null==la?a.container.scrollLeft+a.container.clientWidth/2:la.x+a.container.scrollLeft-a.container.offsetLeft,na=ba||null==la?a.container.scrollTop+a.container.clientHeight/2:la.y+a.container.scrollTop-a.container.offsetTop,fa.style.transformOrigin=K+"px "+na+"px",fa.style.transform="scale("+this.cumulativeZoomFactor+")",Y.style.transformOrigin=K+"px "+na+"px",Y.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(K= -a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(K.style,"transform-origin",(ba||null==la?a.container.clientWidth/2+a.container.scrollLeft-K.offsetLeft+"px":la.x+a.container.scrollLeft-K.offsetLeft-a.container.offsetLeft+"px")+" "+(ba||null==la?a.container.clientHeight/2+a.container.scrollTop-K.offsetTop+"px":la.y+a.container.scrollTop-K.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(K.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity= -"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());R(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(K){null!=X&&window.clearTimeout(X)},null,function(K){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(K){null==X||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(K,ba,ia,na,Fa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs|| -0==this.dialogs.length)if(!a.scrollbars&&!ia&&a.isScrollWheelEvent(K))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(K)?a.view.setTranslate(ia.x+(ba?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(ba?na:-na));else if(ia||a.isZoomWheelEvent(K))for(var ja=mxEvent.getSource(K);null!=ja;){if(ja==a.container)return a.tooltipHandler.hideTooltip(),la=null!=na&&null!=Fa?new mxPoint(na,Fa):new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),V=ia,ia=a.zoomFactor,na=null,K.ctrlKey&&null!= -K.deltaY&&40>Math.abs(K.deltaY)&&Math.round(K.deltaY)!=K.deltaY?ia=1+Math.abs(K.deltaY)/20*(ia-1):null!=K.movementY&&"pointermove"==K.type&&(ia=1+Math.max(1,Math.abs(K.movementY))/20*(ia-1),na=-1),a.lazyZoom(ba,null,na,ia),mxEvent.consume(K),!1;ja=ja.parentNode}}),a.container);a.panningHandler.zoomGraph=function(K){a.cumulativeZoomFactor=K.scale;a.lazyZoom(0=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale* +this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==N&&""!=Z.getAttribute("filter")&&(N=Z.getAttribute("filter"),Z.removeAttribute("filter")),J=new mxPoint(a.container.scrollLeft,a.container.scrollTop), +K=ca||null==la?a.container.scrollLeft+a.container.clientWidth/2:la.x+a.container.scrollLeft-a.container.offsetLeft,na=ca||null==la?a.container.scrollTop+a.container.clientHeight/2:la.y+a.container.scrollTop-a.container.offsetTop,Z.style.transformOrigin=K+"px "+na+"px",Z.style.transform="scale("+this.cumulativeZoomFactor+")",X.style.transformOrigin=K+"px "+na+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(K=a.view.backgroundPageShape.node, +mxUtils.setPrefixedStyle(K.style,"transform-origin",(ca||null==la?a.container.clientWidth/2+a.container.scrollLeft-K.offsetLeft+"px":la.x+a.container.scrollLeft-K.offsetLeft-a.container.offsetLeft+"px")+" "+(ca||null==la?a.container.clientHeight/2+a.container.scrollTop-K.offsetTop+"px":la.y+a.container.scrollTop-K.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(K.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity= +"0",null!=f.hoverIcons&&f.hoverIcons.reset());Q(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(K){null!=da&&window.clearTimeout(da)},null,function(K){1!=a.cumulativeZoomFactor&&Q(0)});mxEvent.addListener(a.container,"scroll",function(K){null==da||a.isMouseDown||1==a.cumulativeZoomFactor||Q(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(K,ca,ia,na,Fa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&& +!ia&&a.isScrollWheelEvent(K))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(K)?a.view.setTranslate(ia.x+(ca?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(ca?na:-na));else if(ia||a.isZoomWheelEvent(K))for(var ja=mxEvent.getSource(K);null!=ja;){if(ja==a.container)return a.tooltipHandler.hideTooltip(),la=null!=na&&null!=Fa?new mxPoint(na,Fa):new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),V=ia,ia=a.zoomFactor,na=null,K.ctrlKey&&null!=K.deltaY&&40>Math.abs(K.deltaY)&&Math.round(K.deltaY)!= +K.deltaY?ia=1+Math.abs(K.deltaY)/20*(ia-1):null!=K.movementY&&"pointermove"==K.type&&(ia=1+Math.max(1,Math.abs(K.movementY))/20*(ia-1),na=-1),a.lazyZoom(ca,null,na,ia),mxEvent.consume(K),!1;ja=ja.parentNode}}),a.container);a.panningHandler.zoomGraph=function(K){a.cumulativeZoomFactor=K.scale;a.lazyZoom(0ia&&null!=Ca&&!mxEvent.isShiftDown(Ia)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style, -mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(ja.model.isVertex(Ca.cell)&&null!=q||ja.model.isEdge(Ca.cell)&&ja.model.isEdge(e[0]))){if(ja.isCellEditable(Ca.cell)){Q= -Ca;var qa=ja.model.isEdge(Ca.cell)?ja.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);Y.style.left=Math.floor(qa.x)+"px";Y.style.top=Math.floor(qa.y)+"px";null==fa&&(ja.container.appendChild(Y),fa=Y.parentNode);m(xa,ya,qa,Y)}}else null==Q||!mxUtils.contains(Q,xa,ya)||1500ia&&null!=Ca&&!mxEvent.isShiftDown(Ia)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style, +mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Fa,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(ja.model.isVertex(Ca.cell)&&null!=q||ja.model.isEdge(Ca.cell)&&ja.model.isEdge(e[0]))){if(ja.isCellEditable(Ca.cell)){T= +Ca;var qa=ja.model.isEdge(Ca.cell)?ja.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==Z&&(ja.container.appendChild(X),Z=X.parentNode);m(xa,ya,qa,X)}}else null==T||!mxUtils.contains(T,xa,ya)||1500ia&&ia>this.dropTargetDelay||ja.model.isEdge(Ja)?Ca:null,null!=E&&qa){ta=[X,la,S,ca,T,P];for(qa=0;qaia&&ia>this.dropTargetDelay||ja.model.isEdge(Ja)?Ca:null,null!=E&&qa){ta=[da,la,S,ba,R,P];for(qa=0;qaR||Math.abs(m.y-V.getGraphY())>R){var K=this.selectionCellsHandler.getHandler(N.cell);null==K&&this.model.isEdge(N.cell)&&(K=this.createHandler(N));if(null!=K&&null!=K.bends&&0Q||Math.abs(m.y-V.getGraphY())>Q){var K=this.selectionCellsHandler.getHandler(N.cell);null==K&&this.model.isEdge(N.cell)&&(K=this.createHandler(N));if(null!=K&&null!=K.bends&&0B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0I||Math.abs(S.y-Q.y)>I)&&(Math.abs(S.x-O.x)>I||Math.abs(S.y-O.y)>I)&&(Math.abs(S.x-fa.x)>I||Math.abs(S.y-fa.y)>I)&&(Math.abs(S.x-Y.x)>I||Math.abs(S.y-Y.y)>I)){Y=S.x-Q.x;fa=S.y-Q.y;S={distSq:Y*Y+fa*fa,x:S.x,y:S.y};for(Y=0;YS.distSq){U.splice(Y,0,S);S=null;break}null==S||0!=U.length&&U[U.length-1].x===S.x&&U[U.length-1].y===S.y||U.push(S)}}}for(T= -0;TF*F&&0F*F&&(Y=new mxPoint(P.x-S.x,P.y-S.y),T=new mxPoint(P.x+S.x,P.y+S.y),U.push(Y),this.addPoints(q,U,B,D,!1,null,E),U=0>Math.round(S.x)||0==Math.round(S.x)&&0>=Math.round(S.y)?1:-1,E=!1,"sharp"==I?(q.lineTo(Y.x-S.y*U,Y.y+S.x*U),q.lineTo(T.x-S.y*U,T.y+S.x*U),q.lineTo(T.x,T.y)):"line"==I?(q.moveTo(Y.x+S.y*U,Y.y-S.x*U),q.lineTo(Y.x-S.y*U,Y.y+S.x*U),q.moveTo(T.x-S.y*U,T.y+S.x*U), -q.lineTo(T.x+S.y*U,T.y-S.x*U),q.moveTo(T.x,T.y)):"arc"==I?(U*=1.3,q.curveTo(Y.x-S.y*U,Y.y+S.x*U,T.x-S.y*U,T.y+S.x*U,T.x,T.y)):(q.moveTo(T.x,T.y),E=!0),U=[T],Y=!0))}else S=null;Y||(U.push(P),O=P)}this.addPoints(q,U,B,D,!1,null,E);q.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(q,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):m.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(q,x,B,D){if(null==x||null==q||"1"!=x.style.snapToPoint&&"1"!=q.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(q,x,D);var F=this.getNextPoint(q,B,D),I=this.graph.isOrthogonal(q),E=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=E){var Q=Math.cos(-E),U=Math.sin(-E);F=mxUtils.getRotatedPoint(F,Q,U,O)}Q=parseFloat(q.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);Q+=parseFloat(q.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==E&&I,Q);0!=E&&(Q=Math.cos(E),U=Math.sin(E),F=mxUtils.getRotatedPoint(F,Q,U,O));q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(q,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(q,x,B,D,F){if(null!=x&&null!=q){q=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=q)for(var I=0;II||Math.abs(S.y-T.y)>I)&&(Math.abs(S.x-O.x)>I||Math.abs(S.y-O.y)>I)&&(Math.abs(S.x-Z.x)>I||Math.abs(S.y-Z.y)>I)&&(Math.abs(S.x-X.x)>I||Math.abs(S.y-X.y)>I)){X=S.x-T.x;Z=S.y-T.y;S={distSq:X*X+Z*Z,x:S.x,y:S.y};for(X=0;XS.distSq){U.splice(X,0,S);S=null;break}null==S||0!=U.length&&U[U.length-1].x===S.x&&U[U.length-1].y===S.y||U.push(S)}}}for(R=0;R< +U.length;R++)B=F(1,U[R].x,U[R].y)||B}S=x[x.length-1];B=F(0,S.x,S.y)||B}q.routedPoints=D;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(q,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style, +"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),E=!0,O=null,T=null,U=[],S=null;q.begin();for(var ba=0;baF*F&&0F*F&&(X=new mxPoint(P.x-S.x,P.y-S.y),R=new mxPoint(P.x+S.x,P.y+S.y),U.push(X),this.addPoints(q,U,B,D,!1,null,E),U=0>Math.round(S.x)||0==Math.round(S.x)&&0>=Math.round(S.y)?1:-1,E=!1,"sharp"==I?(q.lineTo(X.x-S.y*U,X.y+S.x*U),q.lineTo(R.x-S.y*U,R.y+S.x*U),q.lineTo(R.x,R.y)):"line"==I?(q.moveTo(X.x+S.y*U,X.y-S.x*U),q.lineTo(X.x-S.y*U,X.y+S.x*U),q.moveTo(R.x-S.y*U,R.y+S.x*U),q.lineTo(R.x+ +S.y*U,R.y-S.x*U),q.moveTo(R.x,R.y)):"arc"==I?(U*=1.3,q.curveTo(X.x-S.y*U,X.y+S.x*U,R.x-S.y*U,R.y+S.x*U,R.x,R.y)):(q.moveTo(R.x,R.y),E=!0),U=[R],X=!0))}else S=null;X||(U.push(P),O=P)}this.addPoints(q,U,B,D,!1,null,E);q.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(q,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):m.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(q,x,B,D){if(null==x||null==q||"1"!=x.style.snapToPoint&&"1"!=q.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(q,x,D);var F=this.getNextPoint(q,B,D),I=this.graph.isOrthogonal(q),E=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=E){var T=Math.cos(-E),U=Math.sin(-E);F=mxUtils.getRotatedPoint(F,T,U,O)}T=parseFloat(q.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);T+=parseFloat(q.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==E&&I,T);0!=E&&(T=Math.cos(E),U=Math.sin(E),F=mxUtils.getRotatedPoint(F,T,U,O));q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(q,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(q,x,B,D,F){if(null!=x&&null!=q){q=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=q)for(var I=0;I=da.x&&this.model.remove(ra[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +L=0;L=ea.x&&this.model.remove(ra[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, null,[u]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[u]);var Na=this.model.getTerminal(A,!1);if(null!=Na){var Qa=this.getCurrentCellStyle(Na);null!=Qa&&"1"==Qa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[u]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[u]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var k=Graph.prototype.selectCell;Graph.prototype.selectCell= -function(u,z,A){if(z||A)k.apply(this,arguments);else{var C=this.getSelectionCell(),G=null,L=[],W=mxUtils.bind(this,function(ea){if(null!=this.view.getState(ea)&&(this.model.isVertex(ea)||this.model.isEdge(ea)))if(L.push(ea),ea==C)G=L.length-1;else if(u&&null==C&&0G||!u&&0G||!u&&0Ea)for(Aa=0;Aa>Ea;Aa--)this.model.remove(Ra[Ra.length+Aa-1]);Ra=this.model.getChildCells(u[Z],!0);for(Aa=0;AaEa)for(Aa=0;Aa>Ea;Aa--)this.model.remove(Ra[Ra.length+Aa-1]);Ra=this.model.getChildCells(u[Y],!0);for(Aa=0;AamxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(u[C],"")}else{if(this.isTableRow(u[C])&& -(L=this.model.getParent(u[C]),0>mxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),ea=0,Z=0;ZmxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),fa=0,Y=0;YL||da>L)&&this.clear());else{for(Z=da.getSource();null!=Z&&"a"!=Z.nodeName.toLowerCase();)Z=Z.parentNode;null!=Z?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&W.tooltipHandler.reset(da,!0,this.currentState),(null==this.currentState||da.getState()!=this.currentState&&null!=da.sourceState||!W.intersects(this.currentState,da.getGraphX(), -da.getGraphY()))&&this.updateCurrentState(da))}},mouseUp:function(Z,da){var ra=da.getSource();for(Z=da.getEvent();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null==ra&&Math.abs(this.scrollLeft-W.container.scrollLeft)L||ea>L)&&this.clear());else{for(Y=ea.getSource();null!=Y&&"a"!=Y.nodeName.toLowerCase();)Y=Y.parentNode;null!=Y?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&W.tooltipHandler.reset(ea,!0,this.currentState),(null==this.currentState||ea.getState()!=this.currentState&&null!=ea.sourceState||!W.intersects(this.currentState,ea.getGraphX(), +ea.getGraphY()))&&this.updateCurrentState(ea))}},mouseUp:function(Y,ea){var ra=ea.getSource();for(Y=ea.getEvent();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null==ra&&Math.abs(this.scrollLeft-W.container.scrollLeft)ob&&kb++;mb++}jb.lengthmxUtils.indexOf(C,L)&&C.push(L); +u[C].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(u){u=new mxSvgCanvas2D(u);u.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;u.pointerEvents=!0;return u};Graph.prototype.getSelectedTextBlocks=function(){function u(W){if(W.firstChild)return W.firstChild;for(;W;){if(W.nextSibling)return W.nextSibling;W=W.parentNode}}function z(W){var fa=W.startContainer,Y=W.endContainer;W=W.commonAncestorContainer;var ea=[],ra;for(ra=fa.parentNode;ra&&(ea.push(ra),ra!=W);ra= +ra.parentNode);ea.reverse();for(ra=fa;ra&&(ea.push(ra),ra!=Y);ra=u(ra));return ea}var A=[this.getSelectedElement()];if(window.getSelection){var C=window.getSelection();C.getRangeAt&&C.rangeCount&&(A=z(C.getRangeAt(0)))}C=[];for(var G=0;GmxUtils.indexOf(C,L)&&C.push(L); break}else L=L.parentNode;return C};Graph.prototype.getSelectedElement=function(){var u=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(u=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1== this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,z,A){for(;null!=u&&u.nodeName!=z;){if(u==A)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,z,A){for(;null!=u&&!(0<=mxUtils.indexOf(z,u.nodeName));){if(u==A)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var z=null;if(window.getSelection){if(z= window.getSelection(),z.getRangeAt&&z.rangeCount){var A=document.createRange();A.selectNode(u);z.removeAllRanges();z.addRange(A)}}else(z=document.selection)&&"Control"!=z.type&&(u=z.createRange(),u.collapse(!0),A=z.createRange(),A.setEndPoint("StartToStart",u),A.select())};Graph.prototype.flipEdgePoints=function(u,z,A){var C=this.getCellGeometry(u);if(null!=C){C=C.clone();if(null!=C.points)for(var G=0;G=L.length)z.remove(A);else{var W=L.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(L,u));for(C=u=0;C=G.length)z.remove(A);else{this.isTableRow(C)||(C=G[G.length-1]);z.remove(C);u=0;var L=this.getCellGeometry(C);null!=L&&(u=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(), +mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(u,z){var A=null;if(null!==u&&0=L.length)z.remove(A);else{var W=L.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(L,u));for(C=u=0;C=G.length)z.remove(A);else{this.isTableRow(C)||(C=G[G.length-1]);z.remove(C);u=0;var L=this.getCellGeometry(C);null!=L&&(u=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(), W.height-=u,z.setGeometry(A,W))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(u,z){for(var A=u.tBodies[0],C=A.rows[0].cells,G=u=0;Gz&&u[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div"); A.innerHTML=u;u=document.createDocumentFragment();for(var C;C=A.firstChild;)lastNode=u.appendChild(C);z.insertNode(u)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(u)};Graph.prototype.getCentrenMapImagePath=function(u){return window.localStorage.getItem("centreon-url")+"/modules/centreon-map4-web-client/img/"+u};Graph.prototype.setCellDimensions=function(u,z,A){var C=this.getCellGeometry(u);null!=C&&(C=C.clone(),z&&(C.width=z),A&&(C.height=A),this.getModel().setGeometry(u, @@ -2845,9 +2845,9 @@ C))};Graph.prototype.handleCentreonStyleChangeForCells=function(u,z){var A=this; this.addWeatherIconToResource(u)};Graph.prototype.addWeatherIconToResource=function(u){var z=this.getCentrenMapImagePath("weather/weather.svg");z=new mxImage(z,30,30);z=new mxCellOverlay(z,"Weather",null,mxConstants.ALIGN_TOP);this.addCellOverlay(u,z)};Graph.prototype.removeWeatherIconToResource=function(u){this.removeCellOverlay(u)};Graph.prototype.createLinkForHint=function(u,z){function A(G,L){G.length>L&&(G=G.substring(0,Math.round(L/2))+"..."+G.substring(G.length-Math.round(L/4)));return G}u= null!=u?u:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(u)?this.getLinkTitle(u):u;var C=document.createElement("a");C.setAttribute("rel",this.linkRelation);C.setAttribute("href",this.getAbsoluteUrl(u));C.setAttribute("title",A(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&C.setAttribute("target",this.linkTarget);mxUtils.write(C,A(z,40));this.isCustomLink(u)&&mxEvent.addListener(C,"click",mxUtils.bind(this,function(G){this.customLinkClicked(u);mxEvent.consume(G)})); return C};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,W){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(L){L=u.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var W=this.getCellAt(L.graphX,L.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,L.graphX,L.graphY)||(L.state= -this.view.getState(W),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,C=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,W,ea){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),C=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this, -function(L,W){var ea=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!C&&!ea&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));ea=!z||ea?null:mxUtils.bind(this,function(Z){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var da=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ -da.x+1,W.getY()+da.y+1,Z,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,W,ea])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection(): +this.view.getState(W),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,C=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,W,fa){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),C=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this, +function(L,W){var fa=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!C&&!fa&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));fa=!z||fa?null:mxUtils.bind(this,function(Y){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ea=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ +ea.x+1,W.getY()+ea.y+1,Y,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,W,fa])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection(): document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),C="\t";if(null!=u)for(C="";0")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var u=this.graph.view.getState(this.editingCell); -if(null!=u){var z=null!=u&&"0"!=mxUtils.getValue(u.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ea=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):ea,!0);this.textarea.className="mxCellEditor geContentEditable";Z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY, +if(null!=u){var z=null!=u&&"0"!=mxUtils.getValue(u.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){fa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):fa,!0);this.textarea.className="mxCellEditor geContentEditable";Y=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY);var C=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Z*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Z)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=C;this.textarea.style.padding= -"0px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML=ea,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ea=Graph.sanitizeHtml(z? -ea.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ea,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var Z=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Z*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Z)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY; -this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML=ea);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,z){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&& +0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Y*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Y)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=C;this.textarea.style.padding= +"0px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));fa=Graph.sanitizeHtml(z? +fa.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):fa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var Y=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(Y*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(Y)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY; +this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,z){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&& null!=u){var A=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*A;this.bounds.height=60*A;var C=null!=u.text?u.text.margin:null;null==C&&(C=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=C.x*this.bounds.width;this.bounds.y+=C.y*this.bounds.height}this.textarea.style.width= Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return A=Graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=Graph.sanitizeHtml(this.textarea.innerHTML,!0);return z= "1"==mxUtils.getValue(u.style,"nl2Br","1")?z.replace(/\r\n/g,"
").replace(/\n/g,"
"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var U=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();U.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var S=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,z){this.graph.getModel().beginUpdate(); try{S.apply(this,arguments),""==z&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){var z=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=u.cell.geometry&&0this.unscaledBounds.width&&(this.unscaledBounds.width=84);"SHAPE"!==A&&84>this.unscaledBounds.height&&(this.unscaledBounds.height= -84);z.relative||(Z=this.graph.getMaximumGraphBounds(),null!=Z&&null!=this.parentState&&(Z=mxRectangle.fromRectangle(Z),Z.x-=(this.parentState.x-ea.x*C)/C,Z.y-=(this.parentState.y-ea.y*C)/C),this.graph.isConstrainChild(this.state.cell)&&(da=this.graph.getCellContainmentArea(this.state.cell),null!=da&&(A=this.graph.getOverlap(this.state.cell),0Z.x+Z.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-Z.x-Z.width),this.unscaledBounds.y+this.unscaledBounds.height>Z.y+Z.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+ -this.unscaledBounds.height-Z.y-Z.height)));A=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:ea.x*C)+this.unscaledBounds.x*C,(null!=this.parentState?this.parentState.y:ea.y*C)+this.unscaledBounds.y*C,this.unscaledBounds.width*C,this.unscaledBounds.height*C);z.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);Z=Math.cos(L);da=Math.sin(L);z=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY()); -ra=z.x-G.x;W=z.y-G.y;z=Z*ra-da*W-ra;G=da*ra+Z*W-W;ea=this.bounds.x-this.state.x;ra=this.bounds.y-this.state.y;L=Z*ea-da*ra;Z=da*ea+Z*ra;this.bounds.x+=z;this.bounds.y+=G;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+z/C);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+G/C);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);this.graph.isCellCollapsed(this.state.cell)||0==z&&0==G?this.childOffsetY= -this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+L,this.childOffsetY=this.state.y-this.bounds.y+Z);A.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(u),null!=this.preview?this.drawPreview():this.updateParentHighlight())}};var fa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)}; -mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var X=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return X.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible= -function(u){return u.tableHandle||la.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var u=0;this.graph.isTableRow(this.state.cell)?u=1:this.graph.isTableCell(this.state.cell)&&(u=2);return u};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())}; -var V=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var u=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(Pa,Ea,Aa){for(var Ba=[],Ta=0;Tathis.unscaledBounds.width&&(this.unscaledBounds.width=84);"SHAPE"!==A&&84>this.unscaledBounds.height&&(this.unscaledBounds.height= +84);z.relative||(Y=this.graph.getMaximumGraphBounds(),null!=Y&&null!=this.parentState&&(Y=mxRectangle.fromRectangle(Y),Y.x-=(this.parentState.x-fa.x*C)/C,Y.y-=(this.parentState.y-fa.y*C)/C),this.graph.isConstrainChild(this.state.cell)&&(ea=this.graph.getCellContainmentArea(this.state.cell),null!=ea&&(A=this.graph.getOverlap(this.state.cell),0Y.x+Y.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-Y.x-Y.width),this.unscaledBounds.y+this.unscaledBounds.height>Y.y+Y.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+ +this.unscaledBounds.height-Y.y-Y.height)));A=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:fa.x*C)+this.unscaledBounds.x*C,(null!=this.parentState?this.parentState.y:fa.y*C)+this.unscaledBounds.y*C,this.unscaledBounds.width*C,this.unscaledBounds.height*C);z.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);Y=Math.cos(L);ea=Math.sin(L);z=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY()); +ra=z.x-G.x;W=z.y-G.y;z=Y*ra-ea*W-ra;G=ea*ra+Y*W-W;fa=this.bounds.x-this.state.x;ra=this.bounds.y-this.state.y;L=Y*fa-ea*ra;Y=ea*fa+Y*ra;this.bounds.x+=z;this.bounds.y+=G;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+z/C);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+G/C);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);this.graph.isCellCollapsed(this.state.cell)||0==z&&0==G?this.childOffsetY= +this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+L,this.childOffsetY=this.state.y-this.bounds.y+Y);A.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(u),null!=this.preview?this.drawPreview():this.updateParentHighlight())}};var Z=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)}; +mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible; +mxVertexHandler.prototype.isCustomHandleVisible=function(u){return u.tableHandle||la.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var u=0;this.graph.isTableRow(this.state.cell)?u=1:this.graph.isTableCell(this.state.cell)&&(u=2);return u};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())}; +var V=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var u=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(Pa,Ea,Aa){for(var Ba=[],Ta=0;Ta');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,''); @@ -2915,7 +2915,7 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl function(u,z){na.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1L||Math.abs(G)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(u,A),this.isSpaceEvent(z)?(u=this.x+this.width,A=this.y+this.height,C=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/C)*C,this.height=this.graph.snap(this.height/C)*C,this.graph.isGridEnabled()|| (this.width=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&& @@ -2967,8 +2967,8 @@ Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged", this.update);a.addListener("darkModeChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;aP?T.width=84:0Y?84:Y),T.width=P)});var F=this.addGeometryHandler(k,function(T,P,Y){var fa="SHAPE"===Y.getAttribute("type");e.isTableCell(Y)&&(Y=e.model.getParent(Y));if(e.isTableRow(Y))return e.setTableRowHeight(Y,P-T.height),!0;!fa&&0P?T.height=84:0Y?84:Y),T.height=P)});(d.resizable||d.row|| -d.cell)&&a.appendChild(m);var I=this.createPanel("ArrangePanel-addGeometry-2");I.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));I.appendChild(n);var E=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(I,this.getUnit(),16,52,function(){ca.apply(this, -arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var Q=e.getCellGeometry(d.vertices[0]);null!=Q&&Q.relative&&(mxUtils.br(I),n=document.createElement("div"),n.style.position="absolute",n.style.width="70px",n.style.marginTop="0px",mxUtils.write(n,mxResources.get("relative")),I.appendChild(n),this.addGenericInput(I,"%",87,52,function(){return Math.round(1E3*Q.x)/10},function(T){T=parseFloat(T);if(!isNaN(T)){g.beginUpdate(); -try{Q=Q.clone(),Q.x=parseFloat(T)/100,g.setGeometry(d.vertices[0],Q)}finally{g.endUpdate()}}}),this.addGenericInput(I,"%",16,52,function(){return Math.round(1E3*Q.y)/10},function(T){T=parseFloat(T);if(!isNaN(T)){g.beginUpdate();try{Q=Q.clone(),Q.y=parseFloat(T)/100,g.setGeometry(d.vertices[0],Q)}finally{g.endUpdate()}}}),mxUtils.br(I))}a.appendChild(I)}this.addLabel(I,mxResources.get("left"),87).style.marginTop="8px";this.addLabel(I,mxResources.get("top"),16).style.marginTop="8px";var U=mxUtils.bind(this, -function(T,P,Y){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)m.style.display="none";else{m.style.display="";if(Y||document.activeElement!=t)t.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){I.style.display="";if(Y||document.activeElement!=E)E.value= -this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(Y||document.activeElement!=O)O.value=this.inUnit(d.y)+(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(E,U);this.addKeyHandler(O,U);g.addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){g.removeListener(U)}});U();var S=this.addGeometryHandler(E,function(T,P){P=b.fromUnit(P);T.relative?T.offset.x=P:T.x=P});var ca=this.addGeometryHandler(O,function(T,P){P=b.fromUnit(P);T.relative?T.offset.y=P:T.y=P}); -d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(Q=e.getCellGeometry(d.vertices[0]),null!=Q&&Q.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(T){g.beginUpdate();try{Q=Q.clone(),Q.x=0,Q.y=0,Q.offset=new mxPoint,g.setGeometry(d.vertices[0],Q)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="134px",n.style.left="89px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))), +"right";var x=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?q.style.visibility="hidden":m.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(t,U);this.addKeyHandler(k,U);var D=this.addGeometryHandler(t,function(R,P,X){var Z="SHAPE"===X.getAttribute("type");if(e.isTableCell(X))return e.setTableColumnWidth(X,P-R.width,!0),!0;!Z&&0P?R.width=84:0X?84:X),R.width=P)});var F=this.addGeometryHandler(k,function(R,P,X){var Z="SHAPE"===X.getAttribute("type");e.isTableCell(X)&&(X=e.model.getParent(X));if(e.isTableRow(X))return e.setTableRowHeight(X,P-R.height),!0;!Z&&0P?R.height=84:0X?84:X),R.height=P)});(d.resizable||d.row||d.cell)&& +a.appendChild(m);var I=this.createPanel("ArrangePanel-addGeometry-2");I.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));I.appendChild(n);var E=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(I,this.getUnit(),16,52,function(){ba.apply(this,arguments)}, +this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var T=e.getCellGeometry(d.vertices[0]);null!=T&&T.relative&&(mxUtils.br(I),n=document.createElement("div"),n.style.position="absolute",n.style.width="70px",n.style.marginTop="0px",mxUtils.write(n,mxResources.get("relative")),I.appendChild(n),this.addGenericInput(I,"%",87,52,function(){return Math.round(1E3*T.x)/10},function(R){R=parseFloat(R);if(!isNaN(R)){g.beginUpdate();try{T= +T.clone(),T.x=parseFloat(R)/100,g.setGeometry(d.vertices[0],T)}finally{g.endUpdate()}}}),this.addGenericInput(I,"%",16,52,function(){return Math.round(1E3*T.y)/10},function(R){R=parseFloat(R);if(!isNaN(R)){g.beginUpdate();try{T=T.clone(),T.y=parseFloat(R)/100,g.setGeometry(d.vertices[0],T)}finally{g.endUpdate()}}}),mxUtils.br(I))}a.appendChild(I)}this.addLabel(I,mxResources.get("left"),87).style.marginTop="8px";this.addLabel(I,mxResources.get("top"),16).style.marginTop="8px";var U=mxUtils.bind(this, +function(R,P,X){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||null==d.width||null==d.height)m.style.display="none";else{m.style.display="";if(X||document.activeElement!=t)t.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(X||document.activeElement!=k)k.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){I.style.display="";if(X||document.activeElement!=E)E.value= +this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(X||document.activeElement!=O)O.value=this.inUnit(d.y)+(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(E,U);this.addKeyHandler(O,U);g.addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){g.removeListener(U)}});U();var S=this.addGeometryHandler(E,function(R,P){P=b.fromUnit(P);R.relative?R.offset.x=P:R.x=P});var ba=this.addGeometryHandler(O,function(R,P){P=b.fromUnit(P);R.relative?R.offset.y=P:R.y=P}); +d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(T=e.getCellGeometry(d.vertices[0]),null!=T&&T.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(R){g.beginUpdate();try{T=T.clone(),T.x=0,T.y=0,T.offset=new mxPoint,g.setGeometry(d.vertices[0],T)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="134px",n.style.left="89px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))), a.appendChild(I))}; ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var t=parseFloat(a.value);if(isNaN(t))a.value=d+" "+m.getUnit();else if(t!=d){g.getModel().beginUpdate();try{for(var k=e.getSelectionState().cells,q=0;q"),Ka=[e.cellEditor.textarea.firstChild]);for(var Ha=0;HaB;B++)(function(ha){mxEvent.addListener(k[ha],"click",function(){b(k[ha],""==k[ha].style.backgroundImage)})})(B);var Ia=mxUtils.bind(this,function(ha,Da,Ka){var Ha=f.editor.graph;g=f.getSelectionState();ha=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE, +"0px";q=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=R&&e.insertColumn(R,null!=P?P.cellIndex:0)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=R&&e.insertColumn(R,null!=P?P.cellIndex+1:-1)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn", +mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=R&&null!=P&&e.deleteColumn(R,P.cellIndex)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=R&&null!=X&&e.insertRow(R,X.sectionRowIndex)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!= +R&&null!=X&&e.insertRow(R,X.sectionRowIndex+1)}catch(ha){this.editorUi.handleError(ha)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=R&&null!=X&&e.deleteRow(R,X.sectionRowIndex)}catch(ha){this.editorUi.handleError(ha)}}),n)];this.styleButtons(q);q[2].style.marginRight="10px";m=this.createPanel("TextFormatPanel-addFont-colorPanel-wrapper3");m.style.paddingTop="10px";m.style.paddingBottom="10px";m.appendChild(this.createTitle(mxResources.get("table"))); +m.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";q=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(ha){if(null!=R){var Da=R.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(Ka,Ha,La,Ma){return"#"+("0"+Number(Ha).toString(16)).substr(-2)+("0"+Number(La).toString(16)).substr(-2)+("0"+Number(Ma).toString(16)).substr(-2)});this.editorUi.pickColor(Da,function(Ka){var Ha=null==P||null!=ha&& +mxEvent.isShiftDown(ha)?R:P;e.processElements(Ha,function(La){La.style.border=null});null==Ka||Ka==mxConstants.NONE?(Ha.removeAttribute("border"),Ha.style.border="",Ha.style.borderCollapse=""):(Ha.setAttribute("border","1"),Ha.style.border="1px solid "+Ka,Ha.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ha){if(null!=R){var Da=R.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g, +function(Ka,Ha,La,Ma){return"#"+("0"+Number(Ha).toString(16)).substr(-2)+("0"+Number(La).toString(16)).substr(-2)+("0"+Number(Ma).toString(16)).substr(-2)});this.editorUi.pickColor(Da,function(Ka){var Ha=null==P||null!=ha&&mxEvent.isShiftDown(ha)?R:P;e.processElements(Ha,function(La){La.style.backgroundColor=null});Ha.style.backgroundColor=null==Ka||Ka==mxConstants.NONE?"":Ka})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=R){var ha=R.getAttribute("cellPadding")|| +0;ha=new FilenameDialog(f,ha,mxResources.get("apply"),mxUtils.bind(this,function(Da){null!=Da&&0B;B++)(function(ha){mxEvent.addListener(k[ha],"click",function(){b(k[ha],""==k[ha].style.backgroundImage)})})(B);var Ia=mxUtils.bind(this,function(ha,Da,Ka){var Ha=f.editor.graph;g=f.getSelectionState();ha=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE, 0);b(k[0],(ha&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(k[1],(ha&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(k[2],(ha&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);t.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);if(Ka||document.activeElement!=J)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),J.value=isNaN(ha)?"":ha+" pt";ha=g.cells.filter(function(La){return"SHAPE"=== -La.getAttribute("type")});0!==ha.length&&ha.map(function(La){return Ha.getCellStyle(La)}).forEach(function(La){var Ma=mxUtils.getValue(La,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(D,Ma==mxConstants.ALIGN_LEFT);b(F,Ma==mxConstants.ALIGN_CENTER);b(I,Ma==mxConstants.ALIGN_RIGHT);La=mxUtils.getValue(La,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,La==mxConstants.ALIGN_TOP);b(Q,La==mxConstants.ALIGN_MIDDLE);b(U,La==mxConstants.ALIGN_BOTTOM)});ha=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION, -mxConstants.ALIGN_CENTER);Da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);X.value=ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_TOP?"topLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_TOP?"top":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_TOP?"topRight":ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_BOTTOM?"bottomLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_BOTTOM?"bottom":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_BOTTOM? -"bottomRight":ha==mxConstants.ALIGN_LEFT?"left":ha==mxConstants.ALIGN_RIGHT?"right":"center";if(Ka||document.activeElement!=ba)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),ba.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=K)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),K.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=Fa)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Fa.value=isNaN(ha)?"":ha+" pt"; -if(Ka||document.activeElement!=na)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),na.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=ia)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ia.value=isNaN(ha)?"":ha+" pt"});var Ja=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");var ta=this.installInputHandler(K,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Ca=this.installInputHandler(Fa,mxConstants.STYLE_SPACING_RIGHT, -0,-999,999," pt");var qa=this.installInputHandler(na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var Ga=this.installInputHandler(ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ia);this.addKeyHandler(ba,Ia);this.addKeyHandler(K,Ia);this.addKeyHandler(Fa,Ia);this.addKeyHandler(na,Ia);this.addKeyHandler(ia,Ia);e.getModel().addListener(mxEvent.CHANGE,Ia);this.listeners.push({destroy:function(){e.getModel().removeListener(Ia)}});Ia();if(e.cellEditor.isContentEditing()){var Ya= +La.getAttribute("type")});0!==ha.length&&ha.map(function(La){return Ha.getCellStyle(La)}).forEach(function(La){var Ma=mxUtils.getValue(La,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(D,Ma==mxConstants.ALIGN_LEFT);b(F,Ma==mxConstants.ALIGN_CENTER);b(I,Ma==mxConstants.ALIGN_RIGHT);La=mxUtils.getValue(La,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,La==mxConstants.ALIGN_TOP);b(T,La==mxConstants.ALIGN_MIDDLE);b(U,La==mxConstants.ALIGN_BOTTOM)});ha=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION, +mxConstants.ALIGN_CENTER);Da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);da.value=ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_TOP?"topLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_TOP?"top":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_TOP?"topRight":ha==mxConstants.ALIGN_LEFT&&Da==mxConstants.ALIGN_BOTTOM?"bottomLeft":ha==mxConstants.ALIGN_CENTER&&Da==mxConstants.ALIGN_BOTTOM?"bottom":ha==mxConstants.ALIGN_RIGHT&&Da==mxConstants.ALIGN_BOTTOM? +"bottomRight":ha==mxConstants.ALIGN_LEFT?"left":ha==mxConstants.ALIGN_RIGHT?"right":"center";if(Ka||document.activeElement!=ca)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),ca.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=K)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),K.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=Fa)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Fa.value=isNaN(ha)?"":ha+" pt"; +if(Ka||document.activeElement!=na)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),na.value=isNaN(ha)?"":ha+" pt";if(Ka||document.activeElement!=ia)ha=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ia.value=isNaN(ha)?"":ha+" pt"});var Ja=this.installInputHandler(ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var ta=this.installInputHandler(K,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Ca=this.installInputHandler(Fa,mxConstants.STYLE_SPACING_RIGHT, +0,-999,999," pt");var qa=this.installInputHandler(na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var Ga=this.installInputHandler(ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ia);this.addKeyHandler(ca,Ia);this.addKeyHandler(K,Ia);this.addKeyHandler(Fa,Ia);this.addKeyHandler(na,Ia);this.addKeyHandler(ia,Ia);e.getModel().addListener(mxEvent.CHANGE,Ia);this.listeners.push({destroy:function(){e.getModel().removeListener(Ia)}});Ia();if(e.cellEditor.isContentEditing()){var Ya= !1;d=function(){Ya||(Ya=!0,window.setTimeout(function(){var ha=e.getSelectedEditingElement();if(null!=ha){var Da=function(C,G){if(null!=C&&null!=G){if(C==G)return!0;if(C.length>G.length+1)return C.substring(C.length-G.length-1,C.length)=="-"+G}return!1},Ka=function(C){if(null!=e.getParentByName(ha,C,e.cellEditor.textarea))return!0;for(var G=ha;null!=G&&1==G.childNodes.length;)if(G=G.childNodes[0],G.nodeName==C)return!0;return!1},Ha=function(C){C=null!=C?C.fontSize:null;return null!=C&&"px"==C.substring(C.length- 2)?parseFloat(C):mxConstants.DEFAULT_FONTSIZE},La=function(C,G,L){return null!=L.style&&null!=G?(G=G.lineHeight,null!=L.style.lineHeight&&"%"==L.style.lineHeight.substring(L.style.lineHeight.length-1)?parseInt(L.style.lineHeight)/100:"px"==G.substring(G.length-2)?parseFloat(G)/C:parseInt(G)):""},Ma=mxUtils.getCurrentStyle(ha),Za=Ha(Ma),eb=La(Za,Ma,ha),$a=ha.getElementsByTagName("*");if(0<$a.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),z=0;z<$a.length;z++)if(u.containsNode($a[z], -!0)){temp=mxUtils.getCurrentStyle($a[z]);Za=Math.max(Ha(temp),Za);var A=La(Za,temp,$a[z]);if(A!=eb||isNaN(A))eb=""}null!=Ma&&(b(k[0],"bold"==Ma.fontWeight||400Q&&(m=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},k=document.createElement("div"),k.style.className="geAdaptiveAsset",k.style.position="absolute",k.style.left="0px",k.style.top="0px",k.style.bottom= -"0px",k.style.width="24px",k.style.height="24px",k.style.margin="0px",k.style.cursor="pointer",k.style.opacity="0.5",k.style.backgroundRepeat="no-repeat",k.style.backgroundPosition="center center",k.style.backgroundSize="24px 24px",k.style.backgroundImage="url("+Editor.previousImage+")",q=k.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",d.appendChild(k),d.appendChild(q),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){ca(mxUtils.mod(this.format.currentStylePage- -1,Q))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){ca(mxUtils.mod(this.format.currentStylePage+1,Q))})),m(k),m(q))}else S();return a}; +mxUtils.bind(this,function(){return this.format.curved}),mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(m);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var Z=f.getVerticesAndEdges();e.beginUpdate();try{for(var da=0;daT&&(m=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},k=document.createElement("div"),k.style.className="geAdaptiveAsset",k.style.position="absolute", +k.style.left="0px",k.style.top="0px",k.style.bottom="0px",k.style.width="24px",k.style.height="24px",k.style.margin="0px",k.style.cursor="pointer",k.style.opacity="0.5",k.style.backgroundRepeat="no-repeat",k.style.backgroundPosition="center center",k.style.backgroundSize="24px 24px",k.style.backgroundImage="url("+Editor.previousImage+")",q=k.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",d.appendChild(k),d.appendChild(q),mxEvent.addListener(k, +"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage-1,T))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage+1,T))})),m(k),m(q))}else S();return a}; DiagramStylePanel.prototype.addResetButton=function(a){var b=this.editorUi,f=b.editor.graph,e=f.model,g=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(d){d=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c- this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=r(c-this.lastX)*l/w;r=r(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;vw+y?c.y=r.y:c.x=r.x);return mxUtils.getPerimeterPoint(H,c,r)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,r,l){var p="0"!=mxUtils.getValue(h.style, "fixedSize","0"),v=p?S.prototype.fixedSize:S.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,aa=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,H+aa),new mxPoint(w,H+aa),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_WEST? @@ -3298,9 +3298,9 @@ h,p),new mxPoint(l-h,v),new mxPoint(h,v),new mxPoint(h,p)],this.isRounded,w,!0); 2*h,p/2,l,p);c.lineTo(h,p);c.quadTo(h-2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,r,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,r,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",C);mxUtils.extend(G, mxActor);G.prototype.size=20;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,h,r,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(L, mxActor);L.prototype.size=.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,r,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(W,mxEllipse); -W.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,r+p);c.lineTo(h+l,r+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,r);c.lineTo(h+l/2,r+p);c.end();c.stroke()}; -mxCellRenderer.registerShape("orEllipse",ea);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,r+.145*p);c.lineTo(h+.855*l,r+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,r+.145*p);c.lineTo(h+.145*l,r+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(da,mxRhombus);da.prototype.paintVertexShape=function(c,h,r,l,p){mxRhombus.prototype.paintVertexShape.apply(this, -arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",da);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,h,r,l,p){c.begin();c.moveTo(h,r);c.lineTo(h+l,r);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,r+p);c.lineTo(h+l,r+p);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape= +W.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,r+p);c.lineTo(h+l,r+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,r);c.lineTo(h+l/2,r+p);c.end();c.stroke()}; +mxCellRenderer.registerShape("orEllipse",fa);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,r+.145*p);c.lineTo(h+.855*l,r+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,r+.145*p);c.lineTo(h+.145*l,r+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",Y);mxUtils.extend(ea,mxRhombus);ea.prototype.paintVertexShape=function(c,h,r,l,p){mxRhombus.prototype.paintVertexShape.apply(this, +arguments);c.setShadow(!1);c.begin();c.moveTo(h,r+p/2);c.lineTo(h+l,r+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ea);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,h,r,l,p){c.begin();c.moveTo(h,r);c.lineTo(h+l,r);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,r+p);c.lineTo(h+l,r+p);c.lineTo(h+l/2,r+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape= function(c,h,r,l,p){var v=c.state.strokeWidth/2,w=10+2*v,H=r+p-w/2;c.begin();c.moveTo(h,r);c.lineTo(h,r+p);c.moveTo(h+v,H);c.lineTo(h+v+w,H-w/2);c.moveTo(h+v,H);c.lineTo(h+v+w,H+w/2);c.moveTo(h+v,H);c.lineTo(h+l-v,H);c.moveTo(h+l,r);c.lineTo(h+l,r+p);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H-w/2);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Qa,mxEllipse);Qa.prototype.drawHidden=!0;Qa.prototype.paintVertexShape=function(c,h,r, l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),aa="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||H||aa||M||y?(c.rect(h,r,l,p),c.fill(),c.pointerEvents= v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,r),this.outline||H?c.lineTo(h+l,r):c.moveTo(h+l,r),this.outline||aa?c.lineTo(h+l,r+p):c.moveTo(h+l,r+p),this.outline||M?c.lineTo(h,r+p):c.moveTo(h,r+p),(this.outline||y)&&c.lineTo(h,r),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Qa);mxUtils.extend(Ra,mxEllipse);Ra.prototype.paintVertexShape=function(c,h,r,l,p){mxEllipse.prototype.paintVertexShape.apply(this, @@ -3386,64 +3386,64 @@ mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(gb(c,r/2))}h. mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=c.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],H=0;H=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, -.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints= -mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1, -null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5, -0),!1));return c};E.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),r));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-l)));return c};B.prototype.getConstraints=function(c,h,r){c=[];h=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5, -1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1, -0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};F.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style, -"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,h,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};La.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints= -mxEllipse.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Pa.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(c,h,r){c=[];var l=Math.min(h,r/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r));return c};Ca.prototype.getConstraints=function(c,h,r){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c, -"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),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, -h),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(r-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(r-.5*c,3.5*c))];r>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));r>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));r> -15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;L.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)];K.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)];qa.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)];D.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25, -1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5, -1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0), -new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];U.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +[Wa(c,["size","position"],function(r){var l=Math.max(0,Math.min(r.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));mxUtils.getValue(this.state.style,"base",da.prototype.base);return new mxPoint(r.x+p*r.width,r.y+r.height-l)},function(r,l){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(r.height,r.y+r.height-l.y)));this.state.style.position= +Math.round(100*Math.max(0,Math.min(1,(l.x-r.x)/r.width)))/100},!1),Wa(c,["position2"],function(r){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(r.x+l*r.width,r.y+r.height)},function(r,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-r.x)/r.width)))/100},!1),Wa(c,["base"],function(r){var l=Math.max(0,Math.min(r.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),p=Math.max(0,Math.min(1, +mxUtils.getValue(this.state.style,"position",da.prototype.position))),v=Math.max(0,Math.min(r.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(r.x+Math.min(r.width,p*r.width+v),r.y+r.height-l)},function(r,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(r.width,l.x-r.x-p*r.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(c)); +return h},internalStorage:function(c){var h=[Wa(c,["dx","dy"],function(r){var l=Math.max(0,Math.min(r.width,mxUtils.getValue(this.state.style,"dx",La.prototype.dx))),p=Math.max(0,Math.min(r.height,mxUtils.getValue(this.state.style,"dy",La.prototype.dy)));return new mxPoint(r.x+l,r.y+p)},function(r,l){this.state.style.dx=Math.round(Math.max(0,Math.min(r.width,l.x-r.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(r.height,l.y-r.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&& +h.push(gb(c));return h},module:function(c){return[Wa(c,["jettyWidth","jettyHeight"],function(h){var r=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Ca.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",Ca.prototype.jettyHeight)));return new mxPoint(h.x+r/2,h.y+2*l)},function(h,r){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,r.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height, +r.y-h.y))/2)})]},corner:function(c){return[Wa(c,["dx","dy"],function(h){var r=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Ma.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Ma.prototype.dy)));return new mxPoint(h.x+r,h.y+l)},function(h,r){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,r.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,r.y-h.y)))},!1)]},tee:function(c){return[Wa(c,["dx","dy"],function(h){var r= +Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(h.x+(h.width+r)/2,h.y+l)},function(h,r){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,r.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,r.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),"mxgraph.arrows2.wedgeArrow":hb(20,20),"mxgraph.arrows2.wedgeArrowDashed":hb(20, +20),"mxgraph.arrows2.wedgeArrowDashed2":hb(20,20),folder:function(c){return[Wa(c,["tabWidth","tabHeight"],function(h){var r=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(r=h.width-r);return new mxPoint(h.x+r,h.y+l)},function(h,r){var l=Math.max(0,Math.min(h.width, +r.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,r.y-h.y)))},!1)]},document:function(c){return[Wa(c,["size"],function(h){var r=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-r)*h.height)},function(h,r){this.state.style.size=Math.max(0, +Math.min(1,(h.y+h.height-r.y)/h.height))},!1)]},tape:function(c){return[Wa(c,["size"],function(h){var r=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+r*h.height/2)},function(h,r){this.state.style.size=Math.max(0,Math.min(1,(r.y-h.y)/h.height*2))},!1)]},isoCube2:function(c){return[Wa(c,["isoAngle"],function(h){var r=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",q.isoAngle))))*Math.PI/ +200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(r),.5*h.height))},function(h,r){this.state.style.isoAngle=Math.max(0,50*(r.y-h.y)/h.height)},!0)]},cylinder2:bb(x.prototype.size),cylinder3:bb(B.prototype.size),offPageConnector:function(c){return[Wa(c,["size"],function(h){var r=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-r)*h.height)},function(h,r){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height- +r.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(r){var l=Math.max(0,Math.min(r.width/2,r.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(r.x+l,r.y+l)},function(r,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(r.height/2,r.width/2,l.x-r.x)))/100})];c=Graph.createHandle(c,["indent"],function(r){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2)))); +return new mxPoint(r.x+.75*r.width,r.y+l*r.height/200)},function(r,l){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(l.y-r.y)/r.height)))/100});h.push(c);return h},step:qb(la.prototype.size,!0,null,!0,la.prototype.fixedSize),hexagon:qb(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:qb(ba.prototype.size,!1),display:qb(Aa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,E.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,S.prototype.size, +S.prototype.fixedSize),parallelogram:ub(1,U.prototype.size,U.prototype.fixedSize)};Graph.createHandle=Wa;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&& +(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(c=null==c?h:c.concat(h)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory= +{};var jb=new mxPoint(1,0),kb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);jb=mxUtils.getRotatedPoint(jb,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(ob),Math.sin(ob));mxEdgeStyle.IsometricConnector=function(c,h,r,l,p){var v=c.view;l=null!=l&&0=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1, +0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0), +new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Qa.prototype.constraints=mxRectangleShape.prototype.constraints; +mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};E.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,Math.min(r,parseFloat(mxUtils.getValue(this.style, +"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(h+l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-l)));return c};B.prototype.getConstraints=function(c,h,r){c=[];h=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1, +0),!1,null,0,h+.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-h-.5*(.5*r-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};F.prototype.getConstraints= +function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,h,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.75*(r-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};La.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints; +Y.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints=mxEllipse.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Pa.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(c,h,r){c=[];var l=Math.min(h,r/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r));return c};Ca.prototype.getConstraints=function(c,h,r){h=parseFloat(mxUtils.getValue(c, +"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),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,h),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(r-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(r-.5*c,3.5*c))];r>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));r>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1,null,h));r>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;L.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)];K.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)];qa.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)];D.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, +.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, +.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1, +.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];U.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;eb.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style, "dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(h+l),.5*(r+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),r));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(r+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0, @@ -3466,8 +3466,8 @@ this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.op ": "+B.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=m;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=m;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=m;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(e);e.showDialog(k.container, 620,420,!0,!1);k.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=m;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN? Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var k=null;try{k=e.copyXml(),null!=k&&d.removeCells(k,!1)}catch(q){}null==k&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){e.handleError(k)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(q){if(null!= -q){d.getModel().beginUpdate();try{e.pasteXml(q,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),k=!0)}catch(q){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function q(B){if(null!=B){for(var D=0;Dk.length||(1===k.length?(k=d.getCellStyle(k[0]).style,parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}],mxStyle:k||"ICON",event:"setCentreonStyle"}),"*")):parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}],mxStyle:"ICON",event:"setCentreonStyle"}),"*"))}},null,null,Editor.ctrlKey+"+E");this.addAction("createMapFromContainer", @@ -3522,9 +3522,9 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function d.getModel().getParent(k),F=d.getCellGeometry(k);D=Math.round(d.snap(d.popupMenuHandler.triggerX/B-D));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));q.addPointAt(q.state,D,B)}}});this.addAction("removeWaypoint",function(){var k=e.actions.get("removeWaypoint");null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction("clearWaypoints",function(k,q){k=null!=q?q:k;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var B= 0;B"];for(var U=0;U");for(var S=0;S
");O.push("")}O.push("");F=O.join("");Q.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(Q=F.length-1;0<=Q;Q--)if(0==Q||F[Q]!=D[Q-1]){E.selectNode(F[Q].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,m=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", +Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){m=d.getParentByName(n,"TR");var I=mxEvent.isMouseEvent(D)?2:4,E=x,O=Math.min(20,m.sectionRowIndex+I);I=Math.min(20,n.cellIndex+I);for(var T=E.rows.length;T"];for(var U=0;U");for(var S=0;S
");O.push("")}O.push("");F=O.join("");T.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(T=F.length-1;0<=T;T--)if(0==T||F[T]!=D[T-1]){E.selectNode(F[T].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,m=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";f=a.getElementsByTagName("td");1d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu(); d.destroy()});var t=mxUtils.getOffset(a);d.popup(t.x,t.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}m=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){m=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var I=m.value;/(^#?[a-zA-Z0-9]*$)/.test(I)? ("none"!=I&&"#"!=I.charAt(0)&&(I="#"+I),ColorDialog.addRecentColor("none"!=I?I.substring(1):I,12),n(I),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var I=q(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);I.style.marginBottom="8px";return I}this.editorUi=a;var m=document.createElement("input");m.style.marginBottom="10px";mxClient.IS_IE&&(m.style.marginTop="10px",document.body.appendChild(m));var n=null!=f?f:this.createApplyFunction(); -this.init=function(){mxClient.IS_TOUCH||m.focus()};var t=new mxJSColor.color(m);t.pickerOnfocus=!1;t.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var k=document.createElement("center"),q=mxUtils.bind(this,function(I,E,O,Q){E=null!=E?E:12;var U=document.createElement("table");U.style.borderCollapse= -"collapse";U.setAttribute("cellspacing","0");U.style.marginBottom="20px";U.style.cellSpacing="0px";U.style.marginLeft="1px";var S=document.createElement("tbody");U.appendChild(S);for(var ca=I.length/E,T=0;TMAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,m=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var t=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var q=document.createElement("input");q.setAttribute("value",a.editor.getOrCreateFilename());q.style.width="180px";k=document.createElement("td");k.appendChild(q);g.appendChild(k); t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var x=document.createElement("select");x.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));x.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),x.appendChild(k)); @@ -3683,53 +3683,53 @@ k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResourc "180px";k=document.createElement("td");k.appendChild(F);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var I=document.createElement("select");I.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");I.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");I.appendChild(k); k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");I.appendChild(k);k=document.createElement("option");k.setAttribute("value","400");mxUtils.write(k,"400dpi");I.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));I.appendChild(k);var E=document.createElement("input");E.style.width="180px";E.style.display="none";E.setAttribute("value","100");E.setAttribute("type","number");E.setAttribute("min", "50");E.setAttribute("step","50");var O=!1;mxEvent.addListener(I,"change",function(){"custom"==this.value?(this.style.display="none",E.style.display="",E.focus()):(E.value=this.value,O||(B.value=this.value))});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value);isNaN(P)||0>=P?E.style.backgroundColor="red":(E.style.backgroundColor="",O||(B.value=P))});k=document.createElement("td");k.appendChild(I);k.appendChild(E);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td"); -k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(Q);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k); +k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(T);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k); var U=document.createElement("input");U.setAttribute("type","checkbox");U.checked=!1;k=document.createElement("td");k.appendChild(U);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("value",ExportDialog.lastBorderValue);S.style.width="180px";k=document.createElement("td");k.appendChild(S); g.appendChild(k);t.appendChild(g);d.appendChild(t);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){O=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=q.value,Y=x.value,fa=Math.max(0,parseFloat(B.value)|| -100)/100,X=Math.max(0,parseInt(S.value)),la=e.background,J=Math.max(1,parseInt(E.value));if(("svg"==Y||"png"==Y||"pdf"==Y)&&Q.checked)la=null;else if(null==la||la==mxConstants.NONE)la="#ffffff";ExportDialog.lastBorderValue=X;ExportDialog.exportFile(a,P,Y,la,fa,X,J,U.checked)}}));ca.className="geBtn gePrimaryBtn";var T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});T.className="geBtn";a.editor.cancelFirst?(k.appendChild(T),k.appendChild(ca)):(k.appendChild(ca),k.appendChild(T)); +"change",function(){var P=parseInt(F.value)/n;0=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=q.value,X=x.value,Z=Math.max(0,parseFloat(B.value)||100)/ +100,da=Math.max(0,parseInt(S.value)),la=e.background,J=Math.max(1,parseInt(E.value));if(("svg"==X||"png"==X||"pdf"==X)&&T.checked)la=null;else if(null==la||la==mxConstants.NONE)la="#ffffff";ExportDialog.lastBorderValue=da;ExportDialog.exportFile(a,P,X,la,Z,da,J,U.checked)}}));ba.className="geBtn gePrimaryBtn";var R=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});R.className="geBtn";a.editor.cancelFirst?(k.appendChild(R),k.appendChild(ba)):(k.appendChild(ba),k.appendChild(R)); g.appendChild(k);t.appendChild(g);d.appendChild(t);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,f,e,g,d,m,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var t=n.getGraphBounds(),k=mxUtils.createXmlDocument(),q=k.createElement("output");k.appendChild(q);k=new mxXmlCanvas2D(q);k.translate(Math.floor((d/g-t.x)/n.view.scale),Math.floor((d/g-t.y)/n.view.scale));k.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), k);q="xml="+encodeURIComponent(mxUtils.getXml(q));k=Math.ceil(t.width*g/n.view.scale+2*d);g=Math.ceil(t.height*g/n.view.scale+2*d);q.length<=MAX_REQUEST_SIZE&&k*gP.name?1:0});if(null!=F){q=document.createElement("div");q.style.width= -"100%";q.style.fontSize="11px";q.style.textAlign="center";mxUtils.write(q,F);var Q=k.addField(mxResources.get("id")+":",q);mxEvent.addListener(q,"dblclick",function(T){mxEvent.isShiftDown(T)&&(T=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0T.indexOf(":"))try{var P= -mxUtils.indexOf(x,T);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(T,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(T);var Y=k.addTextarea(T+":","",2);Y.style.width="100%";B.push(Y);I(Y,T);Y.focus()}S.setAttribute("disabled","disabled");U.value=""}catch(fa){mxUtils.alert(fa)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(U,"keypress",function(T){13==T.keyCode&&S.click()});this.init=function(){0P.name?1:0});if(null!=F){q=document.createElement("div");q.style.width= +"100%";q.style.fontSize="11px";q.style.textAlign="center";mxUtils.write(q,F);var T=k.addField(mxResources.get("id")+":",q);mxEvent.addListener(q,"dblclick",function(R){mxEvent.isShiftDown(R)&&(R=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0R.indexOf(":"))try{var P= +mxUtils.indexOf(x,R);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(R,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(R);var X=k.addTextarea(R+":","",2);X.style.width="100%";B.push(X);I(X,R);X.focus()}S.setAttribute("disabled","disabled");U.value=""}catch(Z){mxUtils.alert(Z)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(U,"keypress",function(R){13==R.keyCode&&S.click()});this.init=function(){0")});mxEvent.addListener(R,"dragend",function(na){null!=B&&null!=D&&t.addCell(V,t.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width= -"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(t.model.isVisible(V)?"hide":"show"));t.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(R,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(R,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");K.appendChild(ba);mxEvent.addListener(ba,"click",function(na){t.model.setVisible(V,!t.model.isVisible(V));mxEvent.consume(na)}); -ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var ia=t.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter= -"invert(100%)");t.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(na){if(t.isEnabled()){var Fa=null;t.getModel().beginUpdate();try{Fa="1"==mxUtils.getValue(ia,"locked","0")?null:"1",t.setCellStyles("locked",Fa,[V])}finally{t.getModel().endUpdate()}"1"==Fa&&t.removeSelectionCells(t.getModel().getDescendants(V));mxEvent.consume(na)}});K.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,J);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow= -"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";K.appendChild(ba);R.appendChild(K);if(t.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)J=document.createElement("div"),J.style.display="block",J.style.textAlign="right",J.style.whiteSpace="nowrap",J.style.position="absolute",J.style.right="16px",J.style.top="6px",0")});mxEvent.addListener(Q,"dragend",function(na){null!=B&&null!=D&&t.addCell(V,t.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var ca=document.createElement("img");ca.setAttribute("draggable","false");ca.setAttribute("align","top");ca.setAttribute("border","0");ca.style.width= +"16px";ca.style.padding="0px 6px 0 4px";ca.style.marginTop="2px";ca.style.cursor="pointer";ca.setAttribute("title",mxResources.get(t.model.isVisible(V)?"hide":"show"));t.model.isVisible(V)?(ca.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(Q,75)):(ca.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(Q,25));Editor.isDarkMode()&&(ca.style.filter="invert(100%)");K.appendChild(ca);mxEvent.addListener(ca,"click",function(na){t.model.setVisible(V,!t.model.isVisible(V));mxEvent.consume(na)}); +ca=document.createElement("img");ca.setAttribute("draggable","false");ca.setAttribute("align","top");ca.setAttribute("border","0");ca.style.width="16px";ca.style.padding="0px 6px 0 0";ca.style.marginTop="2px";ca.setAttribute("title",mxResources.get("lockUnlock"));var ia=t.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"locked","0")?(ca.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ca,75)):(ca.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ca,25));Editor.isDarkMode()&&(ca.style.filter= +"invert(100%)");t.isEnabled()&&(ca.style.cursor="pointer");mxEvent.addListener(ca,"click",function(na){if(t.isEnabled()){var Fa=null;t.getModel().beginUpdate();try{Fa="1"==mxUtils.getValue(ia,"locked","0")?null:"1",t.setCellStyles("locked",Fa,[V])}finally{t.getModel().endUpdate()}"1"==Fa&&t.removeSelectionCells(t.getModel().getDescendants(V));mxEvent.consume(na)}});K.appendChild(ca);ca=document.createElement("span");mxUtils.write(ca,J);ca.style.display="block";ca.style.whiteSpace="nowrap";ca.style.overflow= +"hidden";ca.style.textOverflow="ellipsis";ca.style.position="absolute";ca.style.left="52px";ca.style.right="8px";ca.style.top="8px";K.appendChild(ca);Q.appendChild(K);if(t.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)J=document.createElement("div"),J.style.display="block",J.style.textAlign="right",J.style.whiteSpace="nowrap",J.style.position="absolute",J.style.right="16px",J.style.top="6px",0Ba.size&&(ra=ra.slice(0, Ba.size));ya=ra.join(",");null!=Ba.countProperty&&(ca.setCellStyles(Ba.countProperty,ra.length,ca.getSelectionCells()),ja.push(Ba.countProperty),Aa.push(ra.length))}ca.setCellStyles(ua,ya,ca.getSelectionCells());ja.push(ua);Aa.push(ya);if(null!=Ba.dependentProps)for(ua=0;uaya)Da=Da.slice(0,ya);else for(var da=Da.length;daka.size&&(Aa=Aa.slice(0, ka.size));fa=Aa.join(",");null!=ka.countProperty&&(Ca.setCellStyles(ka.countProperty,Aa.length,Ca.getSelectionCells()),pa.push(ka.countProperty),ua.push(Aa.length))}Ca.setCellStyles(aa,fa,Ca.getSelectionCells());pa.push(aa);ua.push(fa);if(null!=ka.dependentProps)for(aa=0;aafa)Ua=Ua.slice(0,fa);else for(var Sa=Ua.length;Saka.size&&(Aa=Aa.slice(0, ka.size));fa=Aa.join(",");null!=ka.countProperty&&(Ca.setCellStyles(ka.countProperty,Aa.length,Ca.getSelectionCells()),pa.push(ka.countProperty),ua.push(Aa.length))}Ca.setCellStyles(aa,fa,Ca.getSelectionCells());pa.push(aa);ua.push(fa);if(null!=ka.dependentProps)for(aa=0;aafa)Ua=Ua.slice(0,fa);else for(var Sa=Ua.length;Sa