From 796d69e80b696c83ea15c39c436b33734a0c3cd7 Mon Sep 17 00:00:00 2001 From: gfontaineCentreon Date: Tue, 31 Mar 2026 14:25:56 +0200 Subject: [PATCH 1/7] fix(map): add resource2 for metric link --- src/main/webapp/js/grapheditor/Actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/js/grapheditor/Actions.js b/src/main/webapp/js/grapheditor/Actions.js index 24e774979d..8f22cf525e 100644 --- a/src/main/webapp/js/grapheditor/Actions.js +++ b/src/main/webapp/js/grapheditor/Actions.js @@ -772,7 +772,7 @@ Actions.prototype.init = function() const resourceCentreonProps = ['type', 'resourceType', 'resourceId', 'displayLabel', 'displayImage', 'displayParentName', 'useResourceName', 'label', 'resourceName', 'modelId', 'viewId', 'parentName', 'parentType', 'parentId', 'displayWeatherStatusBackgroundColor', 'useBackgroundStatusColor']; const linkProps = ['type', 'linkType', 'parentName', 'parentType', 'parentId', - 'resourceType', 'resourceId', 'resourceName', 'modelId','metric1Min', + 'resourceType', 'resourceId', 'resourceName', 'resource2Id', 'resource2Name', 'modelId','metric1Min', 'metric1Max', 'metric2Min', 'metric2Max', 'metricName1', 'metricName2', 'displayPercent']; const mediaProps = ['type', 'mediaType', 'newTab', 'elementUrl', 'imageName', 'centreonImageId', 'label']; From 62017545b8504ab374db281d48f9a1eaa7a163ec Mon Sep 17 00:00:00 2001 From: gfontaineCentreon Date: Tue, 31 Mar 2026 17:48:28 +0200 Subject: [PATCH 2/7] fix(map): add fallback to write resource2Id during setDataProperties --- src/main/webapp/js/diagramly/EditorUi.js | 2 +- src/main/webapp/js/grapheditor/Actions.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index a9202b2884..0d26b1f526 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -15258,7 +15258,7 @@ var graph = this.editor.graph; - var cell = graph.getSelectionCell(); + var cell = graph.getSelectionCell() || graph._centreonEditCell; var cellValue = graph.getModel().getValue(cell); cellValue = cellValue.cloneNode(true); diff --git a/src/main/webapp/js/grapheditor/Actions.js b/src/main/webapp/js/grapheditor/Actions.js index 8f22cf525e..5f8b0bf5cd 100644 --- a/src/main/webapp/js/grapheditor/Actions.js +++ b/src/main/webapp/js/grapheditor/Actions.js @@ -818,11 +818,12 @@ Actions.prototype.init = function() cellAttributes = createAttributes(containerProps); } + graph._centreonEditCell = cell; parent.postMessage(JSON.stringify({ mxObject: cellAttributes, mxStyle: cell.getStyle(), event: 'setShowWizardShapeProperties', - }), '*'); + }), '*'); }, null, null, Editor.ctrlKey + '+E'); this.addAction('editCentreonStyle', function() From 9ba8cc5638e56ad07328396650b78e6f6ff9ca7e Mon Sep 17 00:00:00 2001 From: gfontaineCentreon Date: Mon, 20 Apr 2026 14:29:36 +0200 Subject: [PATCH 3/7] fix(map): add minimified files --- src/main/webapp/js/app.min.js | 1116 +++++++++++------------ src/main/webapp/js/stencils.min.js | 326 +++---- src/main/webapp/js/viewer-static.min.js | 6 +- src/main/webapp/js/viewer.min.js | 6 +- 4 files changed, 727 insertions(+), 727 deletions(-) diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 765a566168..5fed6bf566 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -2010,10 +2010,10 @@ 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(0T.clientHeight-E&&(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=S+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 P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ba){P=!0}),null,mxUtils.bind(this,function(ba){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var ba=k(); +d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=S+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,!p)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ba){P=!0}),null,mxUtils.bind(this,function(ba){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var ba=k(); null!=ba&&(B=f=ba.w,C=e=ba.h)}ba=mxUtils.getDocumentSize();F=ba.height;this.bg.style.height=F+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((ba.width-f-E)/2));S=Math.max(1,Math.round((F-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-E):B;e=Math.min(C,F-E);ba=this.getPosition(O,S,f,e);O=ba.x;S=ba.y;T.style.left=O+"px";T.style.top=S+"px";T.style.width=f+"px";T.style.height=e+ "px";!n&&b.clientHeight>T.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=S+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=m;this.container=T;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+ @@ -2021,42 +2021,42 @@ Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)}; Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)}; -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 C=mxUtils.button(e,function(){t&&a.hideDialog();null!=g&&g()}); +var ErrorDialog=function(a,b,f,e,g,d,m,n,t,k,p){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!=p&&p()}),k.className="geBtn",f.appendChild(k));var C=mxUtils.button(e,function(){t&&a.hideDialog();null!=g&&g()}); C.className="geBtn";f.appendChild(C);null!=m&&(e=mxUtils.button(m,function(){t&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(C){var E=m.checked||k.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var F=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(E){var S=m.checked?1:parseInt(q.value);isNaN(S)||(O=mxUtils.getScaleForPageCount(S,f,F))}f.getGraphBounds();var T=S=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*I);F.height=Math.ceil(F.height*I);O*=I;!E&&f.pageVisible?(I=f.getPageLayout(),S-=I.x*F.width,T-=I.y*F.height): +PrintDialog.prototype.create=function(a){function b(C){var E=m.checked||k.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var F=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(E){var S=m.checked?1:parseInt(p.value);isNaN(S)||(O=mxUtils.getScaleForPageCount(S,f,F))}f.getGraphBounds();var T=S=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*I);F.height=Math.ceil(F.height*I);O*=I;!E&&f.pageVisible?(I=f.getPageLayout(),S-=I.x*F.width,T-=I.y*F.height): E=!0;E=PrintDialog.createPrintPreview(f,O,F,0,S,T,E);E.open();C&&PrintDialog.printPreview(E)}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(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});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(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});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; +"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});d.appendChild(n);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(p);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(k,"change", +function(){k.checked?p.removeAttribute("disabled"):p.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; n.style.paddingTop="20px";n.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&n.appendChild(t);if(PrintDialog.previewEnabled){var B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});B.className="geBtn";n.appendChild(B)}B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});B.className="geBtn gePrimaryBtn";n.appendChild(B);a.editor.cancelFirst|| n.appendChild(t);d.appendChild(n);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}}; PrintDialog.createPrintPreview=function(a,b,f,e,g,d,m){b=new mxPrintPreview(a,b,f,e,g,d);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=m;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(t){n.apply(this,arguments);t.writeln('")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){var E=x;null!=E&&null!=E.originalSrc&&(E=a.createImageForPageLink(E.originalSrc,null));null!=E&&null!=E.src?(q.style.backgroundImage="url("+E.src+")",q.style.display="inline-block"):(q.style.backgroundImage="",q.style.display="none");q.style.backgroundColor="";null!=B&&B!=mxConstants.NONE&&(q.style.backgroundColor=B,q.style.display="inline-block")}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody"); +var PageSetupDialog=function(a){function b(){var E=x;null!=E&&null!=E.originalSrc&&(E=a.createImageForPageLink(E.originalSrc,null));null!=E&&null!=E.src?(p.style.backgroundImage="url("+E.src+")",p.style.display="inline-block"):(p.style.backgroundImage="",p.style.display="none");p.style.backgroundColor="";null!=B&&B!=mxConstants.NONE&&(p.style.backgroundColor=B,p.style.display="inline-block")}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("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");d.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var n=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",f.pageFormat);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("gridSize")+":");d.appendChild(m); m=document.createElement("td");m.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","number");t.setAttribute("min","0");t.style.width="40px";t.style.marginLeft="6px";t.value=f.getGridSize();m.appendChild(t);mxEvent.addListener(t,"change",function(){var E=parseInt(t.value);t.value=Math.max(1,isNaN(E)?f.getGridSize():E)});d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("background")+":"); -d.appendChild(m);m=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="middle";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.backgroundSize="contain";q.style.border="1px solid lightGray";q.style.borderRadius="4px";q.style.marginRight="14px";q.style.height="32px"; -q.style.width="64px";q.style.cursor="pointer";q.style.padding="4px";var x=f.backgroundImage,B=f.background,C=function(E){a.showBackgroundImageDialog(function(I,F,O){F||(null!=I&&null!=I.src&&Graph.isPageLink(I.src)&&(I={originalSrc:I.src}),x=I);B=O;b()},x,B);mxEvent.consume(E)};mxEvent.addListener(k,"click",C);mxEvent.addListener(q,"click",C);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= +d.appendChild(m);m=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="middle";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="contain";p.style.border="1px solid lightGray";p.style.borderRadius="4px";p.style.marginRight="14px";p.style.height="32px"; +p.style.width="64px";p.style.cursor="pointer";p.style.padding="4px";var x=f.backgroundImage,B=f.background,C=function(E){a.showBackgroundImageDialog(function(I,F,O){F||(null!=I&&null!=I.src&&Graph.isPageLink(I.src)&&(I={originalSrc:I.src}),x=I);B=O;b()},x,B);mxEvent.consume(E)};mxEvent.addListener(k,"click",C);mxEvent.addListener(p,"click",C);b();m.appendChild(p);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);C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(t.value);isNaN(E)||f.gridSize===E||f.setGridSize(E);E=new ChangePageSetup(a,B,x,n.get());E.ignoreColor=f.background==B;E.ignoreImage=(null!=f.backgroundImage?f.backgroundImage.src:null)===(null!=x?x.src:null);f.pageFormat.width==E.previousFormat.width&& f.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage||f.model.execute(E)});C.className="geBtn gePrimaryBtn";m.appendChild(C);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(ba,U,R){if(R||x!=document.activeElement&&B!=document.activeElement){ba=!1;for(U=0;U=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)), +f.height==R.format.height?(n.value=R.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,ba=!0):f.width==R.format.height&&f.height==R.format.width&&(n.value=R.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,m.setAttribute("checked","checked"),m.defaultChecked=!0,ba=m.checked=!0));ba?(t.style.display="",p.style.display="none"):(x.value=f.width/100,B.value=f.height/100,d.setAttribute("checked","checked"), +n.value="custom",t.style.display="none",p.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var t= +document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";t.style.height="24px";d.style.marginRight="6px";t.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);m.style.marginLeft="10px";m.style.marginRight="6px";t.appendChild(m);var k=document.createElement("span");k.style.width="100px";mxUtils.write(k,mxResources.get("landscape"));t.appendChild(k);var p=document.createElement("div");p.style.marginLeft= +"4px";p.style.width="210px";p.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";p.appendChild(x);mxUtils.write(p," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";p.appendChild(B);mxUtils.write(p," in");t.style.display="none";p.style.display="none";for(var C={},E=PageSetupDialog.getFormats(),I=0;I=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));U&&S||ba.width==T.width&&ba.height==T.height||(T=ba,null!=e&&e(T))};mxEvent.addListener(b,"click",function(ba){d.checked=!0;P(ba);mxEvent.consume(ba)});mxEvent.addListener(k,"click",function(ba){m.checked=!0;P(ba);mxEvent.consume(ba)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(B,"blur",P);mxEvent.addListener(B,"click",P);mxEvent.addListener(m,"change", P);mxEvent.addListener(d,"change",P);mxEvent.addListener(n,"change",function(ba){S="custom"==n.value;P(ba,!0)});P();return{set:function(ba){f=ba;g(null,null,!0)},get:function(){return T},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 C=document.createElement("table"),E=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var I=document.createElement("tr");var F=document.createElement("td");F.style.textOverflow="ellipsis";F.style.textAlign="right";F.style.maxWidth=(B?B+15:100)+"px";F.style.fontSize="10pt";F.style.width=(B?B:84)+"px";mxUtils.write(F,(g||mxResources.get("filename"))+":");I.appendChild(F);var O= +var FilenameDialog=function(a,b,f,e,g,d,m,n,t,k,p,x,B){t=null!=t?t:!0;var C=document.createElement("table"),E=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var I=document.createElement("tr");var F=document.createElement("td");F.style.textOverflow="ellipsis";F.style.textAlign="right";F.style.maxWidth=(B?B+15:100)+"px";F.style.fontSize="10pt";F.style.width=(B?B:84)+"px";mxUtils.write(F,(g||mxResources.get("filename"))+":");I.appendChild(F);var O= document.createElement("input");O.setAttribute("value",b||"");O.style.marginLeft="4px";O.style.width=null!=x?x+"px":"180px";var S=mxUtils.button(f,function(){if(null==d||d(O.value))t&&a.hideDialog(),e(O.value)});S.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 T=C.parentNode;if(null!=T){var P=null;mxEvent.addListener(T,"dragleave", function(ba){null!=P&&(P.style.backgroundColor="",P=null);ba.stopPropagation();ba.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(ba){null==P&&(!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,C=this.view.getBackgroundPageBounds();n=C.width;t=C.height;var E=new mxRectangle(k*q.x,k*q.y,x.width*B,x.height*B),I=(m=m&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(t/E.height)-1:0,F=m?Math.ceil(n/E.width)-1:0,O=C.x+n, +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,p=this.view.translate,x=this.pageFormat,B=k*this.pageScale,C=this.view.getBackgroundPageBounds();n=C.width;t=C.height;var E=new mxRectangle(k*p.x,k*p.y,x.width*B,x.height*B),I=(m=m&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(t/E.height)-1:0,F=m?Math.ceil(n/E.width)-1:0,O=C.x+n, S=C.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", +this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);t=k=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var p=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;bmxUtils.indexOf(d,p[b])&&d.push(p[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 C=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){C(Q.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(N,Q){C(Q.getProperty("cells"), @@ -2100,7 +2100,7 @@ this.toolbar.fontMenu=U;this.toolbar.sizeMenu=R}ba=e.cellEditor.isContentEditing N=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",Q);mxEvent.addListener(e.cellEditor.textarea,"touchend",Q);mxEvent.addListener(e.cellEditor.textarea,"mouseup",Q);mxEvent.addListener(e.cellEditor.textarea,"keyup",Q);Q()}};var J=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(N,Q){try{J.apply(this,arguments),Y()}catch(K){da.handleError(K)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(N){}var W= e.fireMouseEvent;e.fireMouseEvent=function(N,Q,K){N==mxEvent.MOUSE_DOWN&&this.container.focus();W.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(N,Q,K){this.menus.createPopupMenu(N,Q,K)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(N){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT, function(N,Q){var K=[Q.getProperty("cell")];Q.getProperty("terminalInserted")&&(K.push(Q.getProperty("terminal")),window.setTimeout(function(){null!=da.hoverIcons&&da.hoverIcons.update(e.view.getState(K[K.length-1]))},0));C(K)});this.addListener("styleChanged",mxUtils.bind(this,function(N,Q){var K=Q.getProperty("cells"),ca=N=!1;if(0m.length?35*m.length:140;q.className="geToolbarContainer geSidebarContainer";q.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+mxPopupMenu.prototype.zIndex+1+";";n||mxUtils.setPrefixedStyle(q.style,"transform","translate(-22px,-22px)");null!=k.background&&k.background!=mxConstants.NONE&&(q.style.backgroundColor=k.background);k.container.appendChild(q);f=mxUtils.bind(this, -function(C){var E=document.createElement("a");E.className="geItem";E.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px";q.appendChild(E);null!=B&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(B,[C]):x.insertHandler([C],""!=C.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);E.appendChild(this.sidebar.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,"",!0,!1,null,!1,mxUtils.bind(this, -function(I){var F=k.cloneCell(C);if(null!=e)e(F);else{var O=t([F]);F.geometry.x=O.x;F.geometry.y=O.y;k.model.beginUpdate();try{k.addCell(F),k.model.isVertex(F)&&k.isAutoSizeCell(F)&&k.updateCellSize(F)}finally{k.model.endUpdate()}k.setSelectionCell(F);k.scrollCellToVisible(F);k.startEditingAtCell(F);null!=x.hoverIcons&&x.hoverIcons.update(k.view.getState(F))}null!=d&&d();mxEvent.consume(I)}),25,25))});for(g=0;g<(n?Math.min(m.length,4):m.length);g++)f(m[g]);m=q.offsetTop+q.clientHeight-(k.container.scrollTop+ -k.container.offsetHeight);0m.length?35*m.length:140;p.className="geToolbarContainer geSidebarContainer";p.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+mxPopupMenu.prototype.zIndex+1+";";n||mxUtils.setPrefixedStyle(p.style,"transform","translate(-22px,-22px)");null!=k.background&&k.background!=mxConstants.NONE&&(p.style.backgroundColor=k.background);k.container.appendChild(p);f=mxUtils.bind(this, +function(C){var E=document.createElement("a");E.className="geItem";E.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px";p.appendChild(E);null!=B&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(B,[C]):x.insertHandler([C],""!=C.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);E.appendChild(this.sidebar.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,"",!0,!1,null,!1,mxUtils.bind(this, +function(I){var F=k.cloneCell(C);if(null!=e)e(F);else{var O=t([F]);F.geometry.x=O.x;F.geometry.y=O.y;k.model.beginUpdate();try{k.addCell(F),k.model.isVertex(F)&&k.isAutoSizeCell(F)&&k.updateCellSize(F)}finally{k.model.endUpdate()}k.setSelectionCell(F);k.scrollCellToVisible(F);k.startEditingAtCell(F);null!=x.hoverIcons&&x.hoverIcons.update(k.view.getState(F))}null!=d&&d();mxEvent.consume(I)}),25,25))});for(g=0;g<(n?Math.min(m.length,4):m.length);g++)f(m[g]);m=p.offsetTop+p.clientHeight-(k.container.scrollTop+ +k.container.offsetHeight);0f&&(b=a.substring(f,e+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(g){}return b}; EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var e=decodeURIComponent(f);this.isCompatibleString(e)&&(f=e)}a(f)}),"text")}),"html")}; EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0':"")+Graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject; -b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,q?null:this.editorUi.editor.graph.defaultVertexStyle,q?null:this.editorUi.editor.graph.defaultEdgeStyle,q,!0);this.graph2.addCells(b);mxClient.NO_FO=d;q=this.graph2.getGraphBounds();n&&0f||q.height>e)?(f=Math.round(100*Math.min(f/q.width,e/q.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/q.width,this.maxTooltipHeight/q.height))/100),q=this.graph2.getGraphBounds()): -(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",q.width*=f,q.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=q.width+2*this.tooltipBorder+4;e=q.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0f||p.height>e)?(f=Math.round(100*Math.min(f/p.width,e/p.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/p.width,this.maxTooltipHeight/p.height))/100),p=this.graph2.getGraphBounds()): +(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",p.width*=f,p.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=p.width+2*this.tooltipBorder+4;e=p.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=e+"px";g=-Math.round(q.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(q.y-this.tooltipBorder);m=null!=m?m:this.getTooltipOffset(a,q);a=m.x;m=m.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform", +4)),g=this.tooltipTitle.offsetHeight+10,e+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(e-=6,this.tooltipTitle.style.top=e-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=e+"px";g=-Math.round(p.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(p.y-this.tooltipBorder);m=null!=m?m:this.getTooltipOffset(a,p);a=m.x;m=m.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform", "translate("+g+","+f+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=g+"px",this.graph2.view.drawPane.style.top=f+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=m+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()}; Sidebar.prototype.showTooltip=function(a,b,f,e,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var m=mxUtils.bind(this,function(){this.createTooltip(a,b,f,e,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?m():this.thread=window.setTimeout(m,this.tooltipDelay);this.currentElt=a}}; Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,e,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,e)}))}; @@ -2308,16 +2308,16 @@ Sidebar.prototype.addEntries=function(a){for(var b=0;bia&&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)){S= +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!=p||ja.model.isEdge(Ca.cell)&&ja.model.isEdge(e[0]))){if(ja.isCellEditable(Ca.cell)){S= 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==Y&&(ja.container.appendChild(X),Y=X.parentNode);m(xa,ya,qa,X)}}else null==S||!mxUtils.contains(S,xa,ya)||1500ia&&ia>this.dropTargetDelay||ja.model.isEdge(Ja)?Ca:null,null!=F&&qa){ta=[da,la,P,ba,U,R];for(qa=0;qaia&&ia>this.dropTargetDelay||ja.model.isEdge(Ja)?Ca:null,null!=F&&qa){ta=[da,la,P,ba,U,R];for(qa=0;qat||Math.abs(k.y-mxEvent.getClientY(x))> -t)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));m.apply(this,arguments)};b.mouseUp=function(x){try{g.setCellStyles(mxConstants.STYLE_IMAGE_BORDER,"default",f),mxEvent.isPopupTrigger(x)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=e&&e(x),mxEvent.isConsumed(x)||q.itemClicked(f,b,x,a)),n.apply(b,arguments),mxUtils.setOpacity(a,100),k=null,q.currentElt=a}catch(B){b.reset(),q.editorUi.handleError(B)}}}; -Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,e,g,d,m,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0t||Math.abs(k.y-mxEvent.getClientY(x))> +t)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));m.apply(this,arguments)};b.mouseUp=function(x){try{g.setCellStyles(mxConstants.STYLE_IMAGE_BORDER,"default",f),mxEvent.isPopupTrigger(x)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=e&&e(x),mxEvent.isConsumed(x)||p.itemClicked(f,b,x,a)),n.apply(b,arguments),mxUtils.setOpacity(a,100),k=null,p.currentElt=a}catch(B){b.reset(),p.editorUi.handleError(B)}}}; +Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,e,g,d,m,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0mxUtils.indexOf(g,B)){C=this.getTagsForStencil(x,B);var F=null!=n?n[B]:null;null!=F&&C.push(F);q.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(E*m),Math.round(I*m),"",B.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}), -!0,!0);this.addPaletteFunctions(a,b,!1,q)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=t)for(var B=0;BmxUtils.indexOf(g,E))&&x.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+e,Math.round(F*m),Math.round(O*m),"",E.replace(/_/g," "),!0))}),!0)}))}; +Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,m,n,t,k){m=null!=m?m:1;if(this.addStencilsToIndex){var p=[];if(null!=t)for(k=0;kmxUtils.indexOf(g,B)){C=this.getTagsForStencil(x,B);var F=null!=n?n[B]:null;null!=F&&C.push(F);p.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(E*m),Math.round(I*m),"",B.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}), +!0,!0);this.addPaletteFunctions(a,b,!1,p)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=t)for(var B=0;BmxUtils.indexOf(g,E))&&x.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+e,Math.round(F*m),Math.round(O*m),"",E.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;eQ||Math.abs(m.y-W.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&&0Q||Math.abs(m.y-W.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&&0mxUtils.indexOf(k,q)});this.updateCellStyles(n,t)};Graph.prototype.updateCellStyles=function(n,t){this.model.beginUpdate();try{for(var k=0;kmxUtils.indexOf(k,p)});this.updateCellStyles(n,t)};Graph.prototype.updateCellStyles=function(n,t){this.model.beginUpdate();try{for(var k=0;kB?"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:(0g&&"%"==b.charAt(match.index-1))m=d.substring(1);else{var n=d.substring(1,d.length-1);if("id"==n)m=a.id;else if(0>n.indexOf("{"))for(var t=a;null==m&&null!=t;)null!=t.value&&"object"==typeof t.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(m=t.getAttribute(n+"_"+Graph.diagramLanguage)), null==m&&(m=t.hasAttribute(n)?null!=t.getAttribute(n)?t.getAttribute(n):"":null)),t=this.model.getParent(t);null==m&&(m=this.getGlobalVariable(n));null==m&&null!=f&&(m=f[n])}e.push(b.substring(g,match.index)+(null!=m?m:d));g=match.index+d.length}}e.push(b.substring(g))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0I||Math.abs(P.y-S.y)>I)&&(Math.abs(P.x-O.x)>I||Math.abs(P.y-O.y)>I)&&(Math.abs(P.x-Y.x)>I||Math.abs(P.y-Y.y)>I)&&(Math.abs(P.x-X.x)>I||Math.abs(P.y-X.y)>I)){X=P.x-S.x;Y=P.y-S.y;P={distSq:X*X+Y*Y,x:P.x,y:P.y};for(X=0;XP.distSq){T.splice(X,0,P);P=null;break}null==P||0!=T.length&&T[T.length-1].x===P.x&&T[T.length-1].y===P.y||T.push(P)}}}for(U=0;U< -T.length;U++)B=E(1,T[U].x,T[U].y)||B}P=x[x.length-1];B=E(0,P.x,P.y)||B}q.routedPoints=C;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 C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style, -"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),F=!0,O=null,S=null,T=[],P=null;q.begin();for(var ba=0;baE*E&&0E*E&&(X=new mxPoint(R.x-P.x,R.y-P.y),U=new mxPoint(R.x+P.x,R.y+P.y),T.push(X),this.addPoints(q,T,B,C,!1,null,F),T=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,F=!1,"sharp"==I?(q.lineTo(X.x-P.y*T,X.y+P.x*T),q.lineTo(U.x-P.y*T,U.y+P.x*T),q.lineTo(U.x,U.y)):"line"==I?(q.moveTo(X.x+P.y*T,X.y-P.x*T),q.lineTo(X.x-P.y*T,X.y+P.x*T),q.moveTo(U.x-P.y*T,U.y+P.x*T),q.lineTo(U.x+ -P.y*T,U.y-P.x*T),q.moveTo(U.x,U.y)):"arc"==I?(T*=1.3,q.curveTo(X.x-P.y*T,X.y+P.x*T,U.x-P.y*T,U.y+P.x*T,U.x,U.y)):(q.moveTo(U.x,U.y),F=!0),T=[U],X=!0))}else P=null;X||(T.push(R),O=R)}this.addPoints(q,T,B,C,!1,null,F);q.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(q,x,B,C){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,C){if(null==x||null==q||"1"!=x.style.snapToPoint&&"1"!=q.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(q,x,C);var E=this.getNextPoint(q,B,C),I=this.graph.isOrthogonal(q),F=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=F){var S=Math.cos(-F),T=Math.sin(-F);E=mxUtils.getRotatedPoint(E,S,T,O)}S=parseFloat(q.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);S+=parseFloat(q.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(x,E,0==F&&I,S);0!=F&&(S=Math.cos(F),T=Math.sin(F),E=mxUtils.getRotatedPoint(E,S,T,O));q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(q,x,B,C,E),C)}};mxGraphView.prototype.snapToAnchorPoint=function(q,x,B,C,E){if(null!=x&&null!=q){q=this.graph.getAllConnectionConstraints(x);C=B=null;if(null!=q)for(var I=0;IE*E&&0E*E&&(X=new mxPoint(R.x-P.x,R.y-P.y),U=new mxPoint(R.x+P.x,R.y+P.y),T.push(X),this.addPoints(p,T,B,C,!1,null,F),T=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,F=!1,"sharp"==I?(p.lineTo(X.x-P.y*T,X.y+P.x*T),p.lineTo(U.x-P.y*T,U.y+P.x*T),p.lineTo(U.x,U.y)):"line"==I?(p.moveTo(X.x+P.y*T,X.y-P.x*T),p.lineTo(X.x-P.y*T,X.y+P.x*T),p.moveTo(U.x-P.y*T,U.y+P.x*T),p.lineTo(U.x+ +P.y*T,U.y-P.x*T),p.moveTo(U.x,U.y)):"arc"==I?(T*=1.3,p.curveTo(X.x-P.y*T,X.y+P.x*T,U.x-P.y*T,U.y+P.x*T,U.x,U.y)):(p.moveTo(U.x,U.y),F=!0),T=[U],X=!0))}else P=null;X||(T.push(R),O=R)}this.addPoints(p,T,B,C,!1,null,F);p.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(p,x,B,C){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(p,x,B,C){if(null==x||null==p||"1"!=x.style.snapToPoint&&"1"!=p.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(p,x,C);var E=this.getNextPoint(p,B,C),I=this.graph.isOrthogonal(p),F=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=F){var S=Math.cos(-F),T=Math.sin(-F);E=mxUtils.getRotatedPoint(E,S,T,O)}S=parseFloat(p.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);S+=parseFloat(p.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(x,E,0==F&&I,S);0!=F&&(S=Math.cos(F),T=Math.sin(F),E=mxUtils.getRotatedPoint(E,S,T,O));p.setAbsoluteTerminalPoint(this.snapToAnchorPoint(p,x,B,C,E),C)}};mxGraphView.prototype.snapToAnchorPoint=function(p,x,B,C,E){if(null!=x&&null!=p){p=this.graph.getAllConnectionConstraints(x);C=B=null;if(null!=p)for(var I=0;I=d.getStatus()&&eval.call(window,d.getText())}}catch(m){null!=window.console&&console.log("error in getStencil:",a,f,b,g,m)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; @@ -2734,9 +2734,9 @@ A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function( null,[u]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[u]);var Oa=this.model.getTerminal(A,!1);if(null!=Oa){var Qa=this.getCurrentCellStyle(Oa);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 D=this.getSelectionCell(),G=null,L=[],V=mxUtils.bind(this,function(ea){if(null!=this.view.getState(ea)&&(this.model.isVertex(ea)||this.model.isEdge(ea)))if(L.push(ea),ea==D)G=L.length-1;else if(u&&null==D&&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[Z],!0);for(Aa=0;AamxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(u[D],"")}else{if(this.isTableRow(u[D])&& (L=this.model.getParent(u[D]),0>mxUtils.indexOf(u,L)&&0>mxUtils.indexOf(A,L))){for(var V=this.model.getChildCells(L,!0),ea=0,Z=0;Z"),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, +"center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},d)];this.styleButtons(p);p[2].style.marginRight="10px";m.appendChild(d);a.appendChild(m);var ya=m}for(B=0;3>B;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(C,Ma==mxConstants.ALIGN_LEFT);b(E,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(S,La==mxConstants.ALIGN_MIDDLE);b(T,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? @@ -3075,36 +3075,36 @@ StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState this.addEditOps(this.createPanel("StyleFormatPanel-addEditOps"));null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),f=document.createElement("style");mxUtils.setTextContent(f,a);b.body.appendChild(f);return f.sheet.cssRules}; StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var e=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?atob(g):Base64.decode(g,!0),m=mxUtils.parseXml(d);if(null!=m){var n=m.getElementsByTagName("style");for(b=0;bS&&(m=function(R){mxEvent.addListener(R,"mouseenter",function(){R.style.opacity="1"});mxEvent.addListener(R,"mouseleave",function(){R.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,S))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage+1,S))})),m(k),m(q))}else P();return a}; +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+")",p=k.cloneNode(!1),p.style.backgroundImage="url("+Editor.nextImage+")",p.style.left="",p.style.right="2px",d.appendChild(k),d.appendChild(p),mxEvent.addListener(k, +"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage-1,S))})),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage+1,S))})),m(k),m(p))}else P();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(0w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v, -v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",e);var Sa=Math.tan(mxUtils.toRadians(30)),Xa=(.5-Sa)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g, -mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,r,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),r+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,r,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,r,l,p){h=Math.min(l,p/Sa);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0, -.25*h);c.lineTo(.5*h,h*Xa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Xa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.redrawPath=function(c,h,r,l,p,v){h=Math.min(l,p/(.5+Sa));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Xa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Xa)*h),c.lineTo(.5*h,(1-Xa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Xa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5* -h,(1-Xa)*h),c.lineTo(0,.75*h),c.close());c.end()};mxCellRenderer.registerShape("isoCube",m);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,h,r,l,p,v){h=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0, --h);v||(c.moveTo(0,h),c.curveTo(0,-h/3,l,-h/3,l,h),c.lineTo(l,p-h),c.curveTo(l,p+h/3,0,p+h/3,0,p-h),c.close())};n.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(c,h,r,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size", -this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(h,r);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(0,p);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v), -c.end(),c.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(k,t);mxCellRenderer.registerShape("note2",k);k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,0)}return null};mxUtils.extend(q,mxShape);q.prototype.isoAngle=15;q.prototype.paintVertexShape=function(c,h,r,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, -"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);c.translate(h,r);c.begin();c.moveTo(.5*l,0);c.lineTo(l,v);c.lineTo(l,p-v);c.lineTo(.5*l,p);c.lineTo(0,p-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*l,2*v);c.lineTo(l,v);c.moveTo(.5*l,2*v);c.lineTo(.5*l,p);c.stroke()};mxCellRenderer.registerShape("isoCube2",q);mxUtils.extend(x,mxShape);x.prototype.size=15;x.prototype.paintVertexShape=function(c,h,r,l,p){var v=Math.max(0,Math.min(.5* -p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(h,r);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",x);mxUtils.extend(B,mxCylinder);B.prototype.size= -15;B.prototype.paintVertexShape=function(c,h,r,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(h,r);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v,0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1), -w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,r,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",C);mxUtils.extend(E,mxCylinder);E.prototype.tabWidth=60;E.prototype.tabHeight=20;E.prototype.tabPosition="right";E.prototype.arcSize=.1; -E.prototype.paintVertexShape=function(c,h,r,l,p){c.translate(h,r);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));r=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(l,p)); -y=Math.min(y,.5*l,.5*(p-r));h=Math.max(h,y);h=Math.min(l-y,h);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),r),c.lineTo(Math.max(y,0),0),c.lineTo(h,0),c.lineTo(h,r)):(c.moveTo(l-h,r),c.lineTo(l-h,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),r));w?(c.moveTo(0,y+r),c.arcTo(y,y,0,0,1,y,r),c.lineTo(l-y,r),c.arcTo(y,y,0,0,1,l,y+r),c.lineTo(l,p-y),c.arcTo(y,y,0,0,1,l-y,p),c.lineTo(y,p),c.arcTo(y,y,0,0,1,0,p-y)):(c.moveTo(0,r),c.lineTo(l,r),c.lineTo(l,p),c.lineTo(0,p));c.close();c.fillAndStroke(); +function Ua(c,h,r,l,q,v,w,H,y,aa){w+=y;var M=l.clone();l.x-=q*(2*w+y);l.y-=v*(2*w+y);q*=w+y;v*=w+y;return function(){c.ellipse(M.x-q-w,M.y-v-w,2*w,2*w);aa?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;hw?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v, +v),c.lineTo(v,q),c.lineTo(0,q-v),c.close(),c.fill()),c.begin(),c.moveTo(v,q),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",e);var Sa=Math.tan(mxUtils.toRadians(30)),Xa=(.5-Sa)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g, +mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,r,l,q){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),r+.5*(q-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,r,l,q);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,r,l,q){h=Math.min(l,q/Sa);c.translate((l-h)/2,(q-h)/2+h/4);c.moveTo(0, +.25*h);c.lineTo(.5*h,h*Xa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Xa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.redrawPath=function(c,h,r,l,q,v){h=Math.min(l,q/(.5+Sa));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Xa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Xa)*h),c.lineTo(.5*h,(1-Xa)*h)):(c.translate((l-h)/2,(q-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Xa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5* +h,(1-Xa)*h),c.lineTo(0,.75*h),c.close());c.end()};mxCellRenderer.registerShape("isoCube",m);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,h,r,l,q,v){h=Math.min(q/2,Math.round(q/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0, +-h);v||(c.moveTo(0,h),c.curveTo(0,-h/3,l,-h/3,l,h),c.lineTo(l,q-h),c.curveTo(l,q+h/3,0,q+h/3,0,q-h),c.close())};n.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(c,h,r,l,q){var v=Math.max(0,Math.min(l,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size", +this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(h,r);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,q);c.lineTo(0,q);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v), +c.end(),c.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(k,t);mxCellRenderer.registerShape("note2",k);k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,0)}return null};mxUtils.extend(p,mxShape);p.prototype.isoAngle=15;p.prototype.paintVertexShape=function(c,h,r,l,q){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, +"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*q);c.translate(h,r);c.begin();c.moveTo(.5*l,0);c.lineTo(l,v);c.lineTo(l,q-v);c.lineTo(.5*l,q);c.lineTo(0,q-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*l,2*v);c.lineTo(l,v);c.moveTo(.5*l,2*v);c.lineTo(.5*l,q);c.stroke()};mxCellRenderer.registerShape("isoCube2",p);mxUtils.extend(x,mxShape);x.prototype.size=15;x.prototype.paintVertexShape=function(c,h,r,l,q){var v=Math.max(0,Math.min(.5* +q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(h,r);0==v?(c.rect(0,0,l,q),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,q-v),c.arcTo(.5*l,v,0,0,1,.5*l,q),c.arcTo(.5*l,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",x);mxUtils.extend(B,mxCylinder);B.prototype.size= +15;B.prototype.paintVertexShape=function(c,h,r,l,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(h,r);0==v?(c.rect(0,0,l,q),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v,0,0,0,l,0)),c.lineTo(l,q-v),c.arcTo(.5*l,v,0,0,1,.5*l,q),c.arcTo(.5*l,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1), +w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,r,l,q){c.moveTo(0,0);c.quadTo(l/2,.5*q,l,0);c.quadTo(.5*l,q/2,l,q);c.quadTo(l/2,.5*q,0,q);c.quadTo(.5*l,q/2,0,0);c.end()};mxCellRenderer.registerShape("switch",C);mxUtils.extend(E,mxCylinder);E.prototype.tabWidth=60;E.prototype.tabHeight=20;E.prototype.tabPosition="right";E.prototype.arcSize=.1; +E.prototype.paintVertexShape=function(c,h,r,l,q){c.translate(h,r);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));r=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(l,q)); +y=Math.min(y,.5*l,.5*(q-r));h=Math.max(h,y);h=Math.min(l-y,h);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),r),c.lineTo(Math.max(y,0),0),c.lineTo(h,0),c.lineTo(h,r)):(c.moveTo(l-h,r),c.lineTo(l-h,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),r));w?(c.moveTo(0,y+r),c.arcTo(y,y,0,0,1,y,r),c.lineTo(l-y,r),c.arcTo(y,y,0,0,1,l,y+r),c.lineTo(l,q-y),c.arcTo(y,y,0,0,1,l-y,q),c.lineTo(y,q),c.arcTo(y,y,0,0,1,0,q-y)):(c.moveTo(0,r),c.lineTo(l,r),c.lineTo(l,q),c.lineTo(0,q));c.close();c.fillAndStroke(); c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,r+20),c.lineTo(l-20,r+10),c.lineTo(l-10,r+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",E);E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var r=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style, -"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-r),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-r),0,v,Math.min(c.height,c.height- -h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,h,r,l,p){c.translate(h,r);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=r&&(v=10);c.begin();c.moveTo(v, -h);c.arcTo(h,h,0,0,1,v+h,0);c.lineTo(l-h,0);c.arcTo(h,h,0,0,1,l,h);c.lineTo(l,p-h);c.arcTo(h,h,0,0,1,l-h,p);c.lineTo(v+h,p);c.arcTo(h,h,0,0,1,v,p-h);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(l-40,p-20,10,10,3,3),c.stroke(),c.roundrect(l-20,p-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(l-30,p-15),c.lineTo(l-20,p-15),c.stroke());"connPointRefEntry"==r?(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke()):"connPointRefExit"== -r&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(F,mxActor);F.prototype.size=30;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath= -function(c,h,r,l,p){h=Math.max(0,Math.min(l,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,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("card",F);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(c,h,r,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};O.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),r=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*= -l,new mxRectangle(c.x,c.y+h,r,l-2*h);h*=r;return new mxRectangle(c.x+h,c.y,r-2*h,l)}return c};mxCellRenderer.registerShape("tape",O);mxUtils.extend(S,mxActor);S.prototype.size=.3;S.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};S.prototype.redrawPath=function(c,h,r,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0, -0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",S);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,r,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style, +"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),q=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-r),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-r),0,v,Math.min(c.height,c.height- +h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,h,r,l,q){c.translate(h,r);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,q));h=Math.min(h,.5*l,.5*q);v||(h=0);v=0;null!=r&&(v=10);c.begin();c.moveTo(v, +h);c.arcTo(h,h,0,0,1,v+h,0);c.lineTo(l-h,0);c.arcTo(h,h,0,0,1,l,h);c.lineTo(l,q-h);c.arcTo(h,h,0,0,1,l-h,q);c.lineTo(v+h,q);c.arcTo(h,h,0,0,1,v,q-h);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(l-40,q-20,10,10,3,3),c.stroke(),c.roundrect(l-20,q-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(l-30,q-15),c.lineTo(l-20,q-15),c.stroke());"connPointRefEntry"==r?(c.ellipse(0,.5*q-10,20,20),c.fillAndStroke()):"connPointRefExit"== +r&&(c.ellipse(0,.5*q-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*q-5),c.lineTo(15,.5*q+5),c.moveTo(15,.5*q-5),c.lineTo(5,.5*q+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(F,mxActor);F.prototype.size=30;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath= +function(c,h,r,l,q){h=Math.max(0,Math.min(l,Math.min(q,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,0),new mxPoint(l,q),new mxPoint(0,q),new mxPoint(0,h)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("card",F);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(c,h,r,l,q){h=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,q-h/2);c.quadTo(3*l/4,q-1.4*h,l/2,q-h/2);c.quadTo(l/4,q-h*(1-1.4),0,q-h/2);c.lineTo(0,h/2);c.close();c.end()};O.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),r=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*= +l,new mxRectangle(c.x,c.y+h,r,l-2*h);h*=r;return new mxRectangle(c.x+h,c.y,r-2*h,l)}return c};mxCellRenderer.registerShape("tape",O);mxUtils.extend(S,mxActor);S.prototype.size=.3;S.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};S.prototype.redrawPath=function(c,h,r,l,q){h=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0, +0);c.lineTo(l,0);c.lineTo(l,q-h/2);c.quadTo(3*l/4,q-1.4*h,l/2,q-h/2);c.quadTo(l/4,q-h*(1-1.4),0,q-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",S);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,r,l){var q=mxUtils.getValue(this.style,"size");return null!=q?l*Math.max(0,Math.min(1,q)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style, "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style, -"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var r=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition", +"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var r=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),q=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition", this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-r),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-r),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, -"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,h,r,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*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,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,r,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(c,h,r,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* -l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(.5,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,p),new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,p)],this.isRounded,r,!0)};mxCellRenderer.registerShape("trapezoid",P);mxUtils.extend(ba,mxActor);ba.prototype.size=.5;ba.prototype.redrawPath=function(c,h,r,l,p){c.setFillColor(null); -h=l*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(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,r,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",ba);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,h,r,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke); -h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",U);R.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};R.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; -R.prototype.quadTo=function(c,h,r,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=l};R.prototype.curveTo=function(c,h,r,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};R.prototype.arcTo=function(c,h,r,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};R.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var r=function(M){return"number"===typeof M?M?0>M?-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;vM?-1:1:M===M?0:NaN:NaN},l=Math.abs(c- +this.lastX),q=Math.abs(h-this.lastY),v=Math.sqrt(l*l+q*q);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)*q/w;l/=v;q/=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?P.prototype.fixedSize:P.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? -(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+aa),new mxPoint(w+p,H+aa),new mxPoint(w,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+aa),new mxPoint(w,H+aa-p),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+aa-p),new mxPoint(w, -H+aa),new mxPoint(w,H)]);aa=c.getCenterX();c=c.getCenterY();c=new mxPoint(aa,c);l&&(r.xw+y?c.y=r.y:c.x=r.x);return mxUtils.getPerimeterPoint(H,c,r)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,r,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?la.prototype.fixedSize:la.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,M=c.getCenterX(); -c=c.getCenterY();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(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+aa),new mxPoint(w,H+aa),new mxPoint(w+p,c),new mxPoint(w,H)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+ -y-p,c),new mxPoint(w+y,H+aa),new mxPoint(w+p,H+aa),new mxPoint(w,c),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+aa),new mxPoint(M,H+aa-p),new mxPoint(w,H+aa),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(M,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+aa-p),new mxPoint(M,H+aa),new mxPoint(w, -H+aa-p),new mxPoint(w,H)]);M=new mxPoint(M,c);l&&(r.xw+y?M.y=r.y:M.x=r.x);return mxUtils.getPerimeterPoint(H,M,r)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,r,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?J.prototype.fixedSize:J.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,M=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style, -mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+aa-p),new mxPoint(M,H+aa),new mxPoint(w,H+aa-p),new mxPoint(w,H+p),new mxPoint(M,H)]):(p=p?Math.max(0,Math.min(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,c),new mxPoint(w+y-p,H+aa),new mxPoint(w+ -p,H+aa),new mxPoint(w,c),new mxPoint(w+p,H)]);M=new mxPoint(M,c);l&&(r.xw+y?M.y=r.y:M.x=r.x);return mxUtils.getPerimeterPoint(H,M,r)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ya,mxShape);ya.prototype.size=10;ya.prototype.paintBackground=function(c,h,r,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,r);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()}; -mxCellRenderer.registerShape("lollipop",ya);mxUtils.extend(Ia,mxShape);Ia.prototype.size=10;Ia.prototype.inset=2;Ia.prototype.paintBackground=function(c,h,r,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,r);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()}; -mxCellRenderer.registerShape("requires",Ia);mxUtils.extend(Ja,mxShape);Ja.prototype.paintBackground=function(c,h,r,l,p){c.translate(h,r);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ja);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,h,r,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,r);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke(); -c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,r,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));r=w/2;w=r+w/2;var H=Math.min(h,p-h),y=Math.min(H+2*h,p-h);v?(c.moveTo(r,H), -c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(r,H+h),c.moveTo(r,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(r,y+h)):(c.moveTo(r,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(r,p),c.lineTo(r,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(r,y),c.lineTo(r,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(r,H),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,h,r,l,p,v){var w=parseFloat(mxUtils.getValue(this.style, -"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));r=w/2;w=r+w/2;var H=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(r,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(r,H+h),c.moveTo(r,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(r,y+h)):(c.moveTo(r,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(r,p),c.lineTo(r,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(r,y),c.lineTo(r,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(r,H),c.close());c.end()};mxCellRenderer.registerShape("component", -qa);mxUtils.extend(Ga,mxRectangleShape);Ga.prototype.paintForeground=function(c,h,r,l,p){var v=l/2,w=p/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,r),new mxPoint(h+l,r+w),new mxPoint(h+v,r+p),new mxPoint(h,r+w)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ga);mxUtils.extend(Ya,mxDoubleEllipse);Ya.prototype.outerStroke= -!0;Ya.prototype.paintVertexShape=function(c,h,r,l,p){var v=Math.min(4,Math.min(l/5,p/5));0w+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 q="0"!=mxUtils.getValue(h.style, +"fixedSize","0"),v=q?P.prototype.fixedSize:P.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));q&&(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?(q=q?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y-q,H),new mxPoint(w+y,H+aa),new mxPoint(w,H+aa),new mxPoint(w+q,H)]):h==mxConstants.DIRECTION_WEST? +(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-q,H+aa),new mxPoint(w+q,H+aa),new mxPoint(w,H)]):h==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+q),new mxPoint(w+y,H),new mxPoint(w+y,H+aa),new mxPoint(w,H+aa-q),new mxPoint(w,H+q)]):(q=q?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+aa-q),new mxPoint(w, +H+aa),new mxPoint(w,H)]);aa=c.getCenterX();c=c.getCenterY();c=new mxPoint(aa,c);l&&(r.xw+y?c.y=r.y:c.x=r.x);return mxUtils.getPerimeterPoint(H,c,r)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,r,l){var q="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=q?la.prototype.fixedSize:la.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));q&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,aa=c.height,M=c.getCenterX(); +c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-q,H),new mxPoint(w+y,c),new mxPoint(w+y-q,H+aa),new mxPoint(w,H+aa),new mxPoint(w+q,c),new mxPoint(w,H)]):h==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y,H),new mxPoint(w+ +y-q,c),new mxPoint(w+y,H+aa),new mxPoint(w+q,H+aa),new mxPoint(w,c),new mxPoint(w+q,H)]):h==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+q),new mxPoint(M,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+aa),new mxPoint(M,H+aa-q),new mxPoint(w,H+aa),new mxPoint(w,H+q)]):(q=q?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(M,H+q),new mxPoint(w+y,H),new mxPoint(w+y,H+aa-q),new mxPoint(M,H+aa),new mxPoint(w, +H+aa-q),new mxPoint(w,H)]);M=new mxPoint(M,c);l&&(r.xw+y?M.y=r.y:M.x=r.x);return mxUtils.getPerimeterPoint(H,M,r)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,r,l){var q="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=q?J.prototype.fixedSize:J.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));q&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,aa=c.height,M=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style, +mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(q=q?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),H=[new mxPoint(M,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+aa-q),new mxPoint(M,H+aa),new mxPoint(w,H+aa-q),new mxPoint(w,H+q),new mxPoint(M,H)]):(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y-q,H),new mxPoint(w+y,c),new mxPoint(w+y-q,H+aa),new mxPoint(w+ +q,H+aa),new mxPoint(w,c),new mxPoint(w+q,H)]);M=new mxPoint(M,c);l&&(r.xw+y?M.y=r.y:M.x=r.x);return mxUtils.getPerimeterPoint(H,M,r)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ya,mxShape);ya.prototype.size=10;ya.prototype.paintBackground=function(c,h,r,l,q){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,r);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,q);c.end();c.stroke()}; +mxCellRenderer.registerShape("lollipop",ya);mxUtils.extend(Ia,mxShape);Ia.prototype.size=10;Ia.prototype.inset=2;Ia.prototype.paintBackground=function(c,h,r,l,q){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,r);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,q);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()}; +mxCellRenderer.registerShape("requires",Ia);mxUtils.extend(Ja,mxShape);Ja.prototype.paintBackground=function(c,h,r,l,q){c.translate(h,r);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,q/2);c.quadTo(l,q,0,q);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ja);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,h,r,l,q){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,r);c.ellipse(0,v,l-2*v,q-2*v);c.fillAndStroke(); +c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,q/2);c.quadTo(l,q,l/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,r,l,q,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));r=w/2;w=r+w/2;var H=Math.min(h,q-h),y=Math.min(H+2*h,q-h);v?(c.moveTo(r,H), +c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(r,H+h),c.moveTo(r,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(r,y+h)):(c.moveTo(r,0),c.lineTo(l,0),c.lineTo(l,q),c.lineTo(r,q),c.lineTo(r,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(r,y),c.lineTo(r,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(r,H),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,h,r,l,q,v){var w=parseFloat(mxUtils.getValue(this.style, +"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));r=w/2;w=r+w/2;var H=.3*q-h/2,y=.7*q-h/2;v?(c.moveTo(r,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(r,H+h),c.moveTo(r,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(r,y+h)):(c.moveTo(r,0),c.lineTo(l,0),c.lineTo(l,q),c.lineTo(r,q),c.lineTo(r,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(r,y),c.lineTo(r,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(r,H),c.close());c.end()};mxCellRenderer.registerShape("component", +qa);mxUtils.extend(Ga,mxRectangleShape);Ga.prototype.paintForeground=function(c,h,r,l,q){var v=l/2,w=q/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,r),new mxPoint(h+l,r+w),new mxPoint(h+v,r+q),new mxPoint(h,r+w)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ga);mxUtils.extend(Ya,mxDoubleEllipse);Ya.prototype.outerStroke= +!0;Ya.prototype.paintVertexShape=function(c,h,r,l,q){var v=Math.min(4,Math.min(l/5,q/5));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),!1,null,q,r));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)));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;W.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, @@ -3388,12 +3388,12 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim 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};E.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;V.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, +function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),q=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,q)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q))):(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,q)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,h,.25*(r-q)+q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(r-q)+q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(r-q)+q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(r-q)+q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(r-q)+q));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.75*(r-q)+q));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;V.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),q=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,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(q+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*(q+h-l),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,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, @@ -3408,94 +3408,94 @@ Z.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints .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)];T.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;S.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, -0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return c};Ma.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,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(r+p)));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));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +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)))),q=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*q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(h+l),.5*(r+q)));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+q)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,q));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*q));return c};Ma.prototype.getConstraints=function(c,h,r){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),q=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*q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(r+q)));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));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 1),!1));return c};Za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints= -function(c,h,r){c=[];var l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(r-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));c.push(new mxConnectionConstraint(new mxPoint(1, -.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-l));return c};u.prototype.getConstraints=function(c,h,r){c=[];var l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));l=(r-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r));return c};Ea.prototype.getConstraints= -function(c,h,r){c=[];var l=Math.min(r,h),p=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-p)/2;var v=l+p,w=(h-p)/2;p=w+p;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,p,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,r));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +function(c,h,r){c=[];var l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),q=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(r-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-q),l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-q,0));c.push(new mxConnectionConstraint(new mxPoint(1, +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-q,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-q),r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r-l));return c};u.prototype.getConstraints=function(c,h,r){c=[];var l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),q=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));l=(r-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-q,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-q,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,r-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,r));return c};Ea.prototype.getConstraints= +function(c,h,r){c=[];var l=Math.min(r,h),q=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-q)/2;var v=l+q,w=(h-q)/2;q=w+q;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,q,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,r));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,r-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+q),l));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+q),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};ja.prototype.constraints=null;A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, .9),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} -Actions.prototype.init=function(){function a(k){d.escape();var q=d.getDeletableCells(d.getSelectionCells());null!=q&&0Math.abs(k-d.view.scale)&&q==d.container.scrollLeft&&x==d.container.scrollTop&&B==d.view.translate.x&&C==d.view.translate.y&&e.actions.get(d.pageVisible?"fitPage": -"fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?e.actions.get("smartFit").funct():d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,q){try{var x=mxUtils.parseXml(k);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(B){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ +Actions.prototype.init=function(){function a(k){d.escape();var p=d.getDeletableCells(d.getSelectionCells());null!=p&&0Math.abs(k-d.view.scale)&&p==d.container.scrollLeft&&x==d.container.scrollTop&&B==d.view.translate.x&&C==d.view.translate.y&&e.actions.get(d.pageVisible?"fitPage": +"fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?e.actions.get("smartFit").funct():d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,p){try{var x=mxUtils.parseXml(k);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(B){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ ": "+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 C=0;C/g," ").replace(/ /g," "):T,P}}).filter(function(S){return void 0!==S})}var q=d.getSelectionCell()||d.getModel().getRoot();if(q&&q.value){var x=q.getAttribute("type");if(!("WIDGET"===x&&"LINK_LEGEND"===q.getAttribute("widgetType")||"LINK"===x&&"SIMPLE"===q.getAttribute("linkType"))&&["LINK","MEDIA","RESOURCE","WIDGET","CONTAINER"].includes(x)){x="type resourceType resourceId displayLabel displayImage displayParentName useResourceName label resourceName modelId viewId parentName parentType parentId displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "); -var B="type linkType parentName parentType parentId resourceType resourceId resourceName modelId metric1Min metric1Max metric2Min metric2Max metricName1 metricName2 displayPercent".split(" "),C="type mediaType newTab elementUrl imageName centreonImageId label".split(" "),E="type widgetType resourceType useFontStatusColor useBackgroundStatusColor applyStatusColor resourceId pieChartInnerRadius useFontStatusColor pieChartDisplayLabel pieChartExplosion outputWidgetFormat chartDisplayThreshold chartFillLines chartNbPoints chartPeriod chartShowGrid chartStack displayLegend hiddenLine metric1Max metric1Min metricName1 metric2Max metric2Min metricName2 metricsColorStart metricsColorEnd parentName parentType parentId displayPercent resourceName orientation useResourceName displayLabel displayParentName label".split(" "), -I="type modelId viewId imageName centreonImageId label displayLabel displayImage displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "),F=[];void 0!==q.getAttribute("resourceType")&&(F=k(x));void 0!==q.getAttribute("linkType")&&(F=k(B));void 0!==q.getAttribute("mediaType")&&(F=k(C));void 0!==q.getAttribute("widgetType")&&(F=k(E));"CONTAINER"===q.getAttribute("type")&&(F=k(I));parent.postMessage(JSON.stringify({mxObject:F,mxStyle:q.getStyle(),event:"setShowWizardShapeProperties"}), -"*")}}},null,null,Editor.ctrlKey+"+E");this.addAction("editCentreonStyle",function(){var k=d.getSelectionCells()||d.getModel().getRoot();if(k){var q=["RESOURCE","CONTAINER"];k=k.filter(function(x){x=x.getAttribute("type");return q.includes(x)});1>k.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",function(){function k(B){return B.map(function(C){if(void 0!==q.getAttribute(C)){var E=q.getAttribute(C),I={};return I[C]="label"===C?E.replace(/
/g," ").replace(/ /g," "):E,I}}).filter(function(C){return void 0!==C})}var q=d.getSelectionCell()||d.getModel().getRoot(),x="type modelId viewId imageName centreonImageId label".split(" ");"CONTAINER"===q.getAttribute("type")&& -(cellAttributes=k(x),parent.postMessage(JSON.stringify({mxObject:cellAttributes,mxStyle:q.getStyle(),event:"createMapFromContainer"}),"*"))},null,null,Editor.ctrlKey+"+Shift+C");this.addAction("editContent",function(){var k=d.getSelectionCell()||d.getModel().getRoot();null!==k&&(k.getAttribute("viewId")&&k.getAttribute("label")&&"CONTAINER"===k.getAttribute("type")?0==e.pages.filter(function(q){return q.getViewId()===k.getAttribute("viewId")}).length?parent.postMessage(JSON.stringify({event:"createDrawioPageFromContainer", +(k=d.getCellsForGroup(k),1/g," ").replace(/ /g," "):T,P}}).filter(function(S){return void 0!==S})}var p=d.getSelectionCell()||d.getModel().getRoot();if(p&&p.value){var x=p.getAttribute("type");if(!("WIDGET"===x&&"LINK_LEGEND"===p.getAttribute("widgetType")||"LINK"===x&&"SIMPLE"===p.getAttribute("linkType"))&&["LINK","MEDIA","RESOURCE","WIDGET","CONTAINER"].includes(x)){x="type resourceType resourceId displayLabel displayImage displayParentName useResourceName label resourceName modelId viewId parentName parentType parentId displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "); +var B="type linkType parentName parentType parentId resourceType resourceId resourceName resource2Id resource2Name modelId metric1Min metric1Max metric2Min metric2Max metricName1 metricName2 displayPercent".split(" "),C="type mediaType newTab elementUrl imageName centreonImageId label".split(" "),E="type widgetType resourceType useFontStatusColor useBackgroundStatusColor applyStatusColor resourceId pieChartInnerRadius useFontStatusColor pieChartDisplayLabel pieChartExplosion outputWidgetFormat chartDisplayThreshold chartFillLines chartNbPoints chartPeriod chartShowGrid chartStack displayLegend hiddenLine metric1Max metric1Min metricName1 metric2Max metric2Min metricName2 metricsColorStart metricsColorEnd parentName parentType parentId displayPercent resourceName orientation useResourceName displayLabel displayParentName label".split(" "), +I="type modelId viewId imageName centreonImageId label displayLabel displayImage displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "),F=[];void 0!==p.getAttribute("resourceType")&&(F=k(x));void 0!==p.getAttribute("linkType")&&(F=k(B));void 0!==p.getAttribute("mediaType")&&(F=k(C));void 0!==p.getAttribute("widgetType")&&(F=k(E));"CONTAINER"===p.getAttribute("type")&&(F=k(I));d._centreonEditCell=p;parent.postMessage(JSON.stringify({mxObject:F,mxStyle:p.getStyle(),event:"setShowWizardShapeProperties"}), +"*")}}},null,null,Editor.ctrlKey+"+E");this.addAction("editCentreonStyle",function(){var k=d.getSelectionCells()||d.getModel().getRoot();if(k){var p=["RESOURCE","CONTAINER"];k=k.filter(function(x){x=x.getAttribute("type");return p.includes(x)});1>k.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",function(){function k(B){return B.map(function(C){if(void 0!==p.getAttribute(C)){var E=p.getAttribute(C),I={};return I[C]="label"===C?E.replace(/
/g," ").replace(/ /g," "):E,I}}).filter(function(C){return void 0!==C})}var p=d.getSelectionCell()||d.getModel().getRoot(),x="type modelId viewId imageName centreonImageId label".split(" ");"CONTAINER"===p.getAttribute("type")&& +(cellAttributes=k(x),parent.postMessage(JSON.stringify({mxObject:cellAttributes,mxStyle:p.getStyle(),event:"createMapFromContainer"}),"*"))},null,null,Editor.ctrlKey+"+Shift+C");this.addAction("editContent",function(){var k=d.getSelectionCell()||d.getModel().getRoot();null!==k&&(k.getAttribute("viewId")&&k.getAttribute("label")&&"CONTAINER"===k.getAttribute("type")?0==e.pages.filter(function(p){return p.getViewId()===k.getAttribute("viewId")}).length?parent.postMessage(JSON.stringify({event:"createDrawioPageFromContainer", viewId:k.getAttribute("viewId"),label:k.getAttribute("label")}),"*"):e.showError(mxResources.get("warning"),mxResources.get("alreadyOpen"),mxResources.get("ok")):!k.getAttribute("viewId")&&k.getAttribute("label")&&"CONTAINER"===k.getAttribute("type")?e.showError(mxResources.get("warning"),mxResources.get("saveToSeeContainer"),mxResources.get("ok")):k.getAttribute("viewId")&&!k.getAttribute("label")&&"CONTAINER"===k.getAttribute("type")?e.showError(mxResources.get("warning"),mxResources.get("editToSeeContainer"), -mxResources.get("ok")):e.showError(mxResources.get("warning"),mxResources.get("editContainerDataToOpen"),mxResources.get("ok")))},null,null,Editor.ctrlKey+"+Shift+C+T");this.addAction("editTooltip...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var q="";if(mxUtils.isNode(k.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=k.value.getAttribute("tooltip_"+Graph.diagramLanguage)); -null==x&&(x=k.value.getAttribute("tooltip"));null!=x&&(q=x)}q=new TextareaDialog(e,mxResources.get("editTooltip")+":",q,function(B){d.setTooltipForCell(k,B)});e.showDialog(q.container,320,200,!0,!0);q.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var k=d.getLinkForCell(d.getSelectionCell());null!=k&&d.openLink(k)});this.addAction("editLink...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var q=d.getLinkForCell(k)||"";e.showLinkDialog(q, +mxResources.get("ok")):e.showError(mxResources.get("warning"),mxResources.get("editContainerDataToOpen"),mxResources.get("ok")))},null,null,Editor.ctrlKey+"+Shift+C+T");this.addAction("editTooltip...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var p="";if(mxUtils.isNode(k.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=k.value.getAttribute("tooltip_"+Graph.diagramLanguage)); +null==x&&(x=k.value.getAttribute("tooltip"));null!=x&&(p=x)}p=new TextareaDialog(e,mxResources.get("editTooltip")+":",p,function(B){d.setTooltipForCell(k,B)});e.showDialog(p.container,320,200,!0,!0);p.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var k=d.getLinkForCell(d.getSelectionCell());null!=k&&d.openLink(k)});this.addAction("editLink...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var p=d.getLinkForCell(k)||"";e.showLinkDialog(p, mxResources.get("apply"),function(x,B,C){x=mxUtils.trim(x);d.setLinkForCell(k,0/g,"\n"));var E=document.createElement("div"); -E.innerHTML=Graph.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(E.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",k,[q[x]])}else"0"==B&&"1"==k&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"
")),d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C)),d.setCellStyles("html",k,[q[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=k?k:"0"],"cells",q))}finally{d.getModel().endUpdate()}}); -this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),q="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(q=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,q)});this.addAction("rotation",function(){var k="0",q=d.getView().getState(d.getSelectionCell());null!=q&&(k=q.style[mxConstants.STYLE_ROTATION]||k);k=new FilenameDialog(e,k,mxResources.get("apply"),function(x){null!=x&&0/g,"\n"));var E=document.createElement("div"); +E.innerHTML=Graph.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(E.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",k,[p[x]])}else"0"==B&&"1"==k&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"
")),d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C)),d.setCellStyles("html",k,[p[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=k?k:"0"],"cells",p))}finally{d.getModel().endUpdate()}}); +this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),p="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(p=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,p)});this.addAction("rotation",function(){var k="0",p=d.getView().getState(d.getSelectionCell());null!=p&&(k=p.style[mxConstants.STYLE_ROTATION]||k);k=new FilenameDialog(e,k,mxResources.get("apply"),function(x){null!=x&&0"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 1

";d("","h2").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 2

";d("","h3").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 3

";d("","h4").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 4

";d("","h5").firstChild.nextSibling.innerHTML= '
'+mxResources.get("heading")+" 5
";d("","h6").firstChild.nextSibling.innerHTML='
'+mxResources.get("heading")+" 6
";d("","pre").firstChild.nextSibling.innerHTML='
'+mxResources.get("formatted")+"
";d("","blockquote").firstChild.nextSibling.innerHTML='
'+mxResources.get("blockquote")+"
"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(e,g){var d= [6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,B){return x-B}));for(var m=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),C=0;CmxUtils.indexOf(d,this.customFontSizes[t])&&(n(this.customFontSizes[t]),k++);0mxUtils.indexOf(d,this.customFontSizes[t])&&(n(this.customFontSizes[t]),k++);0"];for(var T=0;T");for(var P=0;P
");O.push("")}O.push("");E=O.join("");S.call(F,E);E=F.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(S=E.length-1;0<=S;S--)if(0==S||E[S]!=C[S-1]){F.selectNode(E[S].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,F,O,S){F=null!=F?F:12;var T=document.createElement("table");T.style.borderCollapse= +("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=p(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"),p=mxUtils.bind(this,function(I,F,O,S){F=null!=F?F:12;var T=document.createElement("table");T.style.borderCollapse= "collapse";T.setAttribute("cellspacing","0");T.style.marginBottom="20px";T.style.cellSpacing="0px";T.style.marginLeft="1px";var P=document.createElement("tbody");T.appendChild(P);for(var ba=I.length/F,U=0;U=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href", -"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,m,n,t,k,q,x,B,C,E){k=null!=k?k:!1;m=document.createElement("div");m.style.position="absolute";m.style.top="20px";m.style.bottom="20px";m.style.left="20px";m.style.right="20px";n=document.createElement("div"); -n.style.position="absolute";n.style.left="0px";n.style.right="0px";var I=n.cloneNode(!1),F=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";I.style.top="20px";I.style.bottom="64px";F.style.bottom="0px";F.style.height="60px";F.style.textAlign="center";mxUtils.write(n,b);m.appendChild(n);m.appendChild(I);m.appendChild(F);null!=E&&n.appendChild(E);var O=document.createElement("textarea");q&&O.setAttribute("wrap","off");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete", +"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,m,n,t,k,p,x,B,C,E){k=null!=k?k:!1;m=document.createElement("div");m.style.position="absolute";m.style.top="20px";m.style.bottom="20px";m.style.left="20px";m.style.right="20px";n=document.createElement("div"); +n.style.position="absolute";n.style.left="0px";n.style.right="0px";var I=n.cloneNode(!1),F=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";I.style.top="20px";I.style.bottom="64px";F.style.bottom="0px";F.style.height="60px";F.style.textAlign="center";mxUtils.write(n,b);m.appendChild(n);m.appendChild(I);m.appendChild(F);null!=E&&n.appendChild(E);var O=document.createElement("textarea");p&&O.setAttribute("wrap","off");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete", "off");O.setAttribute("autocapitalize","off");mxUtils.write(O,f||"");O.style.resize="none";O.style.outline="none";O.style.position="absolute";O.style.boxSizing="border-box";O.style.top="0px";O.style.left="0px";O.style.height="100%";O.style.width="100%";this.textarea=O;this.init=function(){O.focus();O.scrollTop=0};I.appendChild(O);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",F.appendChild(b));if(null!=C)for(b=0;bMAX_AREA||0>=C.value?"red":"";E.style.backgroundColor=C.value*E.value>MAX_AREA||0>=E.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); +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 p=document.createElement("input");p.setAttribute("value",a.editor.getOrCreateFilename());p.style.width="180px";k=document.createElement("td");k.appendChild(p);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)); k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));x.appendChild(k);a.printPdfExport||(k=document.createElement("option"),k.setAttribute("value","pdf"),mxUtils.write(k,mxResources.get("formatPdf")),x.appendChild(k));k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));x.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k, mxResources.get("formatXml")),x.appendChild(k));k=document.createElement("td");k.appendChild(x);g.appendChild(k);t.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");g.appendChild(k);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("value","100");B.style.width="180px";k=document.createElement("td");k.appendChild(B);g.appendChild(k);t.appendChild(g);g=document.createElement("tr"); @@ -3652,31 +3652,31 @@ k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=null==e.background||e.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(S);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 T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;k=document.createElement("td");k.appendChild(T);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 P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";k=document.createElement("td");k.appendChild(P); g.appendChild(k);t.appendChild(g);d.appendChild(t);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){O=!0;var R=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*R).toFixed(2));0=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var R=q.value,X=x.value,Y=Math.max(0,parseFloat(B.value)||100)/ +"change",function(){var R=parseInt(E.value)/n;0=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var R=p.value,X=x.value,Y=Math.max(0,parseFloat(B.value)||100)/ 100,da=Math.max(0,parseInt(P.value)),la=e.background,J=Math.max(1,parseInt(F.value));if(("svg"==X||"png"==X||"pdf"==X)&&S.checked)la=null;else if(null==la||la==mxConstants.NONE)la="#ffffff";ExportDialog.lastBorderValue=da;ExportDialog.exportFile(a,R,X,la,Y,da,J,T.checked)}}));ba.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(k.appendChild(U),k.appendChild(ba)):(k.appendChild(ba),k.appendChild(U)); 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*gR.name?1:0});if(null!=E){q=document.createElement("div");q.style.width= -"100%";q.style.fontSize="11px";q.style.textAlign="center";mxUtils.write(q,E);var S=k.addField(mxResources.get("id")+":",q);mxEvent.addListener(q,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(R){null!=R&&0R.name?1:0});if(null!=E){p=document.createElement("div");p.style.width= +"100%";p.style.fontSize="11px";p.style.textAlign="center";mxUtils.write(p,E);var S=k.addField(mxResources.get("id")+":",p);mxEvent.addListener(p,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(R){null!=R&&0U.indexOf(":"))try{var R= mxUtils.indexOf(x,U);if(0<=R&&null!=B[R])B[R].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=R&&(x.splice(R,1),B.splice(R,1));x.push(U);var X=k.addTextarea(U+":","",2);X.style.width="100%";B.push(X);I(X,U);X.focus()}P.setAttribute("disabled","disabled");T.value=""}catch(Y){mxUtils.alert(Y)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(U){13==U.keyCode&&P.click()});this.init=function(){0")});mxEvent.addListener(Q,"dragend",function(na){null!=B&&null!=C&&t.addCell(W,t.model.root,C);C=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= @@ -3688,14 +3688,14 @@ mxResources.get("toBack")),K.className="geButton",K.style.cssFloat="none",K.inne K.style.width="14px",K.style.height="14px",K.style.fontSize="14px",K.style.margin="0px",K.style.marginTop="-1px",J.appendChild(K),mxEvent.addListener(K,"click",function(na){t.isEnabled()&&t.addCell(W,t.model.root,la+1);mxEvent.consume(na)})),Q.appendChild(J);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(Q.setAttribute("draggable","true"),Q.style.cursor="move")}mxEvent.addListener(Q,"dblclick",function(na){var Fa=mxEvent.getSource(na).nodeName;"INPUT"!=Fa&&"IMG"!=Fa&&(d(W),mxEvent.consume(na))}); t.getDefaultParent()==W&&(Q.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",Q.style.fontWeight=t.isEnabled()?"bold":"",I=W);mxEvent.addListener(Q,"click",function(na){t.isEnabled()&&(t.setDefaultParent(N),t.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&t.setSelectionCells(W.children),mxEvent.consume(na))});x.appendChild(Q)}E=t.model.getChildCount(t.model.root);x.innerText="";U.clear();for(var Y=E-1;0<=Y;Y--)mxUtils.bind(this,function(la){X(Y,t.convertValueToString(la)||mxResources.get("background"), la,la)})(t.model.getChildAt(t.model.root,Y));var da=t.convertValueToString(I)||mxResources.get("background");S.setAttribute("title",mxResources.get("removeIt",[da]));ba.setAttribute("title",mxResources.get("duplicateIt",[da]));t.isSelectionEmpty()&&(T.className="geButton mxDisabled");m()}var t=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom= -"10px";k.style.overflow="auto";var q=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(q)+7+"px";k.appendChild(x);var B=null,C=null;mxEvent.addListener(k,"dragover",function(X){X.dataTransfer.dropEffect="move";C=0;X.stopPropagation();X.preventDefault()});mxEvent.addListener(k,"drop", -function(X){X.stopPropagation();X.preventDefault()});var E=null,I=null,F=document.createElement("div");F.className="geToolbarContainer";F.style.position="absolute";F.style.bottom="0px";F.style.left="0px";F.style.right="0px";F.style.height=q;F.style.overflow="hidden";F.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";F.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";F.style.borderWidth="1px 0px 0px 0px";F.style.borderColor="#c3c3c3";F.style.borderStyle="solid";F.style.display= -"block";F.style.whiteSpace="nowrap";var O=document.createElement("a");O.className="geButton";var S=O.cloneNode(!1);q=document.createElement("img");q.setAttribute("border","0");q.setAttribute("width","22");q.setAttribute("src",Editor.trashImage);q.style.opacity="0.9";Editor.isDarkMode()&&(q.style.filter="invert(100%)");S.appendChild(q);mxEvent.addListener(S,"click",function(X){if(t.isEnabled()){t.model.beginUpdate();try{var Y=t.model.root.getIndex(I);t.removeCells([I],!1);0==t.model.getChildCount(t.model.root)? -(t.model.add(t.model.root,new mxCell),t.setDefaultParent(null)):0=ba.status&&"mxUtils.indexOf(y,na)&&y.push(na),G.fireEvent(new mxEventObject("cellsInserted","cells",[na])));l=null!=na;na=qa;if(!l)for(Ka=0;KamxUtils.indexOf(y,Ga)}; -this.executeLayout(function(){wa.execute(G.getDefaultParent());pa()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&oa.length==2*y.length-1&&1==ta.length){G.view.validate();var ba=new mxCompactTreeLayout(G,"horizontaltree"==ea);ba.levelDistance=O;ba.edgeRouting=!1;ba.resetEdges=!1;this.executeLayout(function(){ba.execute(G.getDefaultParent(),0mxUtils.indexOf(y,Ga)};this.executeLayout(function(){ka.execute(G.getDefaultParent()); -pa()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&oa.length>y.length){G.view.validate();var Pa=new mxFastOrganicLayout(G);Pa.forceConstant=3*O;Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Va=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Ga){return Va.apply(this,arguments)||0>mxUtils.indexOf(y,Ga)};this.executeLayout(function(){Pa.execute(G.getDefaultParent());pa()},!0,W);W=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=W&&W()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch= -function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0mxUtils.indexOf(d,q)&&null!=urlParams[q]&&(g+=l+q+"="+urlParams[q],l="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0mxUtils.indexOf(l,q)&&(d=0==g?d+"?":d+"&",null!=urlParams[q]&&(d+=q+"="+urlParams[q],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,l,q,t){d=new LinkDialog(this,d,g,l,!0,q,t);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| -g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var l=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!l); -this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g); -this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d), -null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var A=EditorUi.prototype.createSidebar; -EditorUi.prototype.createSidebar=function(d){var g=A.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var z=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){z.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),l=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q); -this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(q);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("editConnectionPoints").setEnabled(q&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(q&&l.image&&0';var y={};try{var D=mxSettings.getCustomLibraries();for(d=0;d'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+ -"";else for(var J=0;Jt.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo", -{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(D){null!=g&&g(D)}};q.onsuccess=mxUtils.bind(this,function(t){var y=q.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(D){if(!D||"1"==urlParams.forceMigration){var F=document.createElement("iframe");F.style.display= -"none";F.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(F);var G=!0,P=!1,J,n=0,v=mxUtils.bind(this,function(){P=!0;this.setDatabaseItem(".drawioMigrated3",!0);F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),E=mxUtils.bind(this,function(){n++;I()}),I=mxUtils.bind(this,function(){try{if(n>=J.length)v();else{var K=J[n];StorageFile.getFileContent(this,K,mxUtils.bind(this, -function(L){null==L||".scratchpad"==K&&L==this.emptyLibraryXml?F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[K]}),"*"):E()}),E)}}catch(L){console.log(L)}}),M=mxUtils.bind(this,function(K){try{this.setDatabaseItem(null,[{title:K.title,size:K.data.length,lastModified:Date.now(),type:K.isLib?"L":"F"},{title:K.title,data:K.data}],E,E,["filesInfo","files"])}catch(L){console.log(L)}});D=mxUtils.bind(this,function(K){try{if(K.source==F.contentWindow){var L= -{};try{L=JSON.parse(K.data)}catch(R){}"init"==L.event?(F.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||P||(G?null!=L.resp&&0"===q.substring(0,12);q=""===q.substring(0,11);(t||q)&&d.push(l)}}return d};EditorUi.prototype.getLocalStorageFile= -function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:""===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +Aa=qa.next().value;if(Da.includes(za)){var La=new RegExp(za+"=(.+?);","g");"style"===za&&N.handleCentreonStyleChange(sa,Da,Aa);Da=Da.replace(La,za+"="+Aa+";")}}N.getModel().setStyle(sa,Da)}else if("setDataProperties"===J.action){N=this.editor.graph;sa=N.getSelectionCell()||N._centreonEditCell;var ja=N.getModel().getValue(sa);ja=ja.cloneNode(!0);void 0!==J&&void 0!==J.data&&Object.entries(J.data).forEach(function(ba){var ia=$jscomp.makeIterator(ba);ba=ia.next().value;ia=ia.next().value;ja.setAttribute(ba, +ia)});if("CONTAINER"===sa.getAttribute("type")&&0=ba.status&&"mxUtils.indexOf(y,na)&&y.push(na),G.fireEvent(new mxEventObject("cellsInserted","cells",[na])));l=null!=na;na=qa;if(!l)for(Ka=0;KamxUtils.indexOf(y,Ga)};this.executeLayout(function(){wa.execute(G.getDefaultParent());pa()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&oa.length==2*y.length-1&&1==ta.length){G.view.validate();var ba=new mxCompactTreeLayout(G,"horizontaltree"==ea);ba.levelDistance=O;ba.edgeRouting=!1;ba.resetEdges=!1;this.executeLayout(function(){ba.execute(G.getDefaultParent(), +0mxUtils.indexOf(y,Ga)};this.executeLayout(function(){ka.execute(G.getDefaultParent());pa()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&oa.length>y.length){G.view.validate();var Pa=new mxFastOrganicLayout(G);Pa.forceConstant=3*O;Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Va=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Ga){return Va.apply(this,arguments)||0>mxUtils.indexOf(y,Ga)};this.executeLayout(function(){Pa.execute(G.getDefaultParent()); +pa()},!0,W);W=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=W&&W()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0mxUtils.indexOf(d,q)&&null!=urlParams[q]&&(g+=l+q+"="+urlParams[q],l="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0mxUtils.indexOf(l,q)&&(d=0==g?d+"?":d+"&",null!=urlParams[q]&&(d+=q+"="+urlParams[q],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,l,q,t){d=new LinkDialog(this,d,g,l,!0,q,t);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&& +"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g); +this.menus.get("viewZoom").setEnabled(g);var l=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l)); +d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g); +this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck= +function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var A=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var g=A.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var z=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates= +function(){z.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),l=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(q);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("editConnectionPoints").setEnabled(q&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(q&& +l.image&&0';var y={};try{var D=mxSettings.getCustomLibraries();for(d=0;d'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"";else for(var J=0;Jt.oldVersion&&y.createObjectStore("objects",{keyPath:"key"}); +2>t.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(D){null!=g&&g(D)}};q.onsuccess=mxUtils.bind(this,function(t){var y=q.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(D){if(!D|| +"1"==urlParams.forceMigration){var F=document.createElement("iframe");F.style.display="none";F.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(F);var G=!0,P=!1,J,n=0,v=mxUtils.bind(this,function(){P=!0;this.setDatabaseItem(".drawioMigrated3",!0);F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),E=mxUtils.bind(this,function(){n++;I()}),I=mxUtils.bind(this,function(){try{if(n>= +J.length)v();else{var K=J[n];StorageFile.getFileContent(this,K,mxUtils.bind(this,function(L){null==L||".scratchpad"==K&&L==this.emptyLibraryXml?F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[K]}),"*"):E()}),E)}}catch(L){console.log(L)}}),M=mxUtils.bind(this,function(K){try{this.setDatabaseItem(null,[{title:K.title,size:K.data.length,lastModified:Date.now(),type:K.isLib?"L":"F"},{title:K.title,data:K.data}],E,E,["filesInfo","files"])}catch(L){console.log(L)}}); +D=mxUtils.bind(this,function(K){try{if(K.source==F.contentWindow){var L={};try{L=JSON.parse(K.data)}catch(R){}"init"==L.event?(F.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||P||(G?null!=L.resp&&0"===q.substring(0,12);q=""===q.substring(0,11);(t|| +q)&&d.push(l)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:""===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); var CommentsWindow=function(b,e,f,c,k,m){function u(){for(var E=D.getElementsByTagName("div"),I=0,M=0;M/g," ").replace(/ /g," "):P,M}}).filter(function(I){return void 0!==I})}var H=p.getSelectionCell()||p.getModel().getRoot();if(H&&H.value){var N=H.getAttribute("type");if(!("WIDGET"===N&&"LINK_LEGEND"===H.getAttribute("widgetType")||"LINK"===N&&"SIMPLE"===H.getAttribute("linkType"))&&["LINK","MEDIA","RESOURCE","WIDGET","CONTAINER"].includes(N)){N="type resourceType resourceId displayLabel displayImage displayParentName useResourceName label resourceName modelId viewId parentName parentType parentId displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "); -var d="type linkType parentName parentType parentId resourceType resourceId resourceName modelId metric1Min metric1Max metric2Min metric2Max metricName1 metricName2 displayPercent".split(" "),f="type mediaType newTab elementUrl imageName centreonImageId label".split(" "),g="type widgetType resourceType useFontStatusColor useBackgroundStatusColor applyStatusColor resourceId pieChartInnerRadius useFontStatusColor pieChartDisplayLabel pieChartExplosion outputWidgetFormat chartDisplayThreshold chartFillLines chartNbPoints chartPeriod chartShowGrid chartStack displayLegend hiddenLine metric1Max metric1Min metricName1 metric2Max metric2Min metricName2 metricsColorStart metricsColorEnd parentName parentType parentId displayPercent resourceName orientation useResourceName displayLabel displayParentName label".split(" "), -y="type modelId viewId imageName centreonImageId label displayLabel displayImage displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "),t=[];void 0!==H.getAttribute("resourceType")&&(t=D(N));void 0!==H.getAttribute("linkType")&&(t=D(d));void 0!==H.getAttribute("mediaType")&&(t=D(f));void 0!==H.getAttribute("widgetType")&&(t=D(g));"CONTAINER"===H.getAttribute("type")&&(t=D(y));parent.postMessage(JSON.stringify({mxObject:t,mxStyle:H.getStyle(),event:"setShowWizardShapeProperties"}), +var d="type linkType parentName parentType parentId resourceType resourceId resourceName resource2Id resource2Name modelId metric1Min metric1Max metric2Min metric2Max metricName1 metricName2 displayPercent".split(" "),f="type mediaType newTab elementUrl imageName centreonImageId label".split(" "),g="type widgetType resourceType useFontStatusColor useBackgroundStatusColor applyStatusColor resourceId pieChartInnerRadius useFontStatusColor pieChartDisplayLabel pieChartExplosion outputWidgetFormat chartDisplayThreshold chartFillLines chartNbPoints chartPeriod chartShowGrid chartStack displayLegend hiddenLine metric1Max metric1Min metricName1 metric2Max metric2Min metricName2 metricsColorStart metricsColorEnd parentName parentType parentId displayPercent resourceName orientation useResourceName displayLabel displayParentName label".split(" "), +y="type modelId viewId imageName centreonImageId label displayLabel displayImage displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "),t=[];void 0!==H.getAttribute("resourceType")&&(t=D(N));void 0!==H.getAttribute("linkType")&&(t=D(d));void 0!==H.getAttribute("mediaType")&&(t=D(f));void 0!==H.getAttribute("widgetType")&&(t=D(g));"CONTAINER"===H.getAttribute("type")&&(t=D(y));p._centreonEditCell=H;parent.postMessage(JSON.stringify({mxObject:t,mxStyle:H.getStyle(),event:"setShowWizardShapeProperties"}), "*")}}},null,null,Editor.ctrlKey+"+E");this.addAction("editCentreonStyle",function(){var D=p.getSelectionCells()||p.getModel().getRoot();if(D){var H=["RESOURCE","CONTAINER"];D=D.filter(function(N){N=N.getAttribute("type");return H.includes(N)});1>D.length||(1===D.length?(D=p.getCellStyle(D[0]).style,parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}],mxStyle:D||"ICON",event:"setCentreonStyle"}),"*")):parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}], mxStyle:"ICON",event:"setCentreonStyle"}),"*"))}},null,null,Editor.ctrlKey+"+E");this.addAction("createMapFromContainer",function(){function D(d){return d.map(function(f){if(void 0!==H.getAttribute(f)){var g=H.getAttribute(f),y={};return y[f]="label"===f?g.replace(/
/g," ").replace(/ /g," "):g,y}}).filter(function(f){return void 0!==f})}var H=p.getSelectionCell()||p.getModel().getRoot(),N="type modelId viewId imageName centreonImageId label".split(" ");"CONTAINER"===H.getAttribute("type")&& (cellAttributes=D(N),parent.postMessage(JSON.stringify({mxObject:cellAttributes,mxStyle:H.getStyle(),event:"createMapFromContainer"}),"*"))},null,null,Editor.ctrlKey+"+Shift+C");this.addAction("editContent",function(){var D=p.getSelectionCell()||p.getModel().getRoot();null!==D&&(D.getAttribute("viewId")&&D.getAttribute("label")&&"CONTAINER"===D.getAttribute("type")?0==m.pages.filter(function(H){return H.getViewId()===D.getAttribute("viewId")}).length?parent.postMessage(JSON.stringify({event:"createDrawioPageFromContainer", @@ -3840,7 +3840,7 @@ this.editor.modified=!1,this.editor.setStatus(""))}else if("loadFromContainer"== this.editor.graph.saveViewState(Aa.viewState,Ma);mxUtils.setTextContent(Aa.node,Graph.compressNode(Ma));this.insertPage(Aa)}}else if("refreshPageXml"==O.action)qa=null!=O.xml&&0/g," ").replace(/ /g," "):P,M}}).filter(function(I){return void 0!==I})}var H=p.getSelectionCell()||p.getModel().getRoot();if(H&&H.value){var N=H.getAttribute("type");if(!("WIDGET"===N&&"LINK_LEGEND"===H.getAttribute("widgetType")||"LINK"===N&&"SIMPLE"===H.getAttribute("linkType"))&&["LINK","MEDIA","RESOURCE","WIDGET","CONTAINER"].includes(N)){N="type resourceType resourceId displayLabel displayImage displayParentName useResourceName label resourceName modelId viewId parentName parentType parentId displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "); -var d="type linkType parentName parentType parentId resourceType resourceId resourceName modelId metric1Min metric1Max metric2Min metric2Max metricName1 metricName2 displayPercent".split(" "),f="type mediaType newTab elementUrl imageName centreonImageId label".split(" "),g="type widgetType resourceType useFontStatusColor useBackgroundStatusColor applyStatusColor resourceId pieChartInnerRadius useFontStatusColor pieChartDisplayLabel pieChartExplosion outputWidgetFormat chartDisplayThreshold chartFillLines chartNbPoints chartPeriod chartShowGrid chartStack displayLegend hiddenLine metric1Max metric1Min metricName1 metric2Max metric2Min metricName2 metricsColorStart metricsColorEnd parentName parentType parentId displayPercent resourceName orientation useResourceName displayLabel displayParentName label".split(" "), -y="type modelId viewId imageName centreonImageId label displayLabel displayImage displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "),t=[];void 0!==H.getAttribute("resourceType")&&(t=D(N));void 0!==H.getAttribute("linkType")&&(t=D(d));void 0!==H.getAttribute("mediaType")&&(t=D(f));void 0!==H.getAttribute("widgetType")&&(t=D(g));"CONTAINER"===H.getAttribute("type")&&(t=D(y));parent.postMessage(JSON.stringify({mxObject:t,mxStyle:H.getStyle(),event:"setShowWizardShapeProperties"}), +var d="type linkType parentName parentType parentId resourceType resourceId resourceName resource2Id resource2Name modelId metric1Min metric1Max metric2Min metric2Max metricName1 metricName2 displayPercent".split(" "),f="type mediaType newTab elementUrl imageName centreonImageId label".split(" "),g="type widgetType resourceType useFontStatusColor useBackgroundStatusColor applyStatusColor resourceId pieChartInnerRadius useFontStatusColor pieChartDisplayLabel pieChartExplosion outputWidgetFormat chartDisplayThreshold chartFillLines chartNbPoints chartPeriod chartShowGrid chartStack displayLegend hiddenLine metric1Max metric1Min metricName1 metric2Max metric2Min metricName2 metricsColorStart metricsColorEnd parentName parentType parentId displayPercent resourceName orientation useResourceName displayLabel displayParentName label".split(" "), +y="type modelId viewId imageName centreonImageId label displayLabel displayImage displayWeatherStatusBackgroundColor useBackgroundStatusColor".split(" "),t=[];void 0!==H.getAttribute("resourceType")&&(t=D(N));void 0!==H.getAttribute("linkType")&&(t=D(d));void 0!==H.getAttribute("mediaType")&&(t=D(f));void 0!==H.getAttribute("widgetType")&&(t=D(g));"CONTAINER"===H.getAttribute("type")&&(t=D(y));p._centreonEditCell=H;parent.postMessage(JSON.stringify({mxObject:t,mxStyle:H.getStyle(),event:"setShowWizardShapeProperties"}), "*")}}},null,null,Editor.ctrlKey+"+E");this.addAction("editCentreonStyle",function(){var D=p.getSelectionCells()||p.getModel().getRoot();if(D){var H=["RESOURCE","CONTAINER"];D=D.filter(function(N){N=N.getAttribute("type");return H.includes(N)});1>D.length||(1===D.length?(D=p.getCellStyle(D[0]).style,parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}],mxStyle:D||"ICON",event:"setCentreonStyle"}),"*")):parent.postMessage(JSON.stringify({mxObject:[{type:"RESOURCE_AND_CONTAINER"}], mxStyle:"ICON",event:"setCentreonStyle"}),"*"))}},null,null,Editor.ctrlKey+"+E");this.addAction("createMapFromContainer",function(){function D(d){return d.map(function(f){if(void 0!==H.getAttribute(f)){var g=H.getAttribute(f),y={};return y[f]="label"===f?g.replace(/
/g," ").replace(/ /g," "):g,y}}).filter(function(f){return void 0!==f})}var H=p.getSelectionCell()||p.getModel().getRoot(),N="type modelId viewId imageName centreonImageId label".split(" ");"CONTAINER"===H.getAttribute("type")&& (cellAttributes=D(N),parent.postMessage(JSON.stringify({mxObject:cellAttributes,mxStyle:H.getStyle(),event:"createMapFromContainer"}),"*"))},null,null,Editor.ctrlKey+"+Shift+C");this.addAction("editContent",function(){var D=p.getSelectionCell()||p.getModel().getRoot();null!==D&&(D.getAttribute("viewId")&&D.getAttribute("label")&&"CONTAINER"===D.getAttribute("type")?0==m.pages.filter(function(H){return H.getViewId()===D.getAttribute("viewId")}).length?parent.postMessage(JSON.stringify({event:"createDrawioPageFromContainer", @@ -3840,7 +3840,7 @@ this.editor.modified=!1,this.editor.setStatus(""))}else if("loadFromContainer"== this.editor.graph.saveViewState(Aa.viewState,Ma);mxUtils.setTextContent(Aa.node,Graph.compressNode(Ma));this.insertPage(Aa)}}else if("refreshPageXml"==O.action)qa=null!=O.xml&&0 Date: Thu, 23 Apr 2026 10:24:03 +0200 Subject: [PATCH 4/7] Update src/main/webapp/js/grapheditor/Actions.js Co-authored-by: Vincent Untz --- src/main/webapp/js/grapheditor/Actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/js/grapheditor/Actions.js b/src/main/webapp/js/grapheditor/Actions.js index 5f8b0bf5cd..6eb1e1bcf7 100644 --- a/src/main/webapp/js/grapheditor/Actions.js +++ b/src/main/webapp/js/grapheditor/Actions.js @@ -772,7 +772,7 @@ Actions.prototype.init = function() const resourceCentreonProps = ['type', 'resourceType', 'resourceId', 'displayLabel', 'displayImage', 'displayParentName', 'useResourceName', 'label', 'resourceName', 'modelId', 'viewId', 'parentName', 'parentType', 'parentId', 'displayWeatherStatusBackgroundColor', 'useBackgroundStatusColor']; const linkProps = ['type', 'linkType', 'parentName', 'parentType', 'parentId', - 'resourceType', 'resourceId', 'resourceName', 'resource2Id', 'resource2Name', 'modelId','metric1Min', + 'resourceType', 'resourceId', 'resourceName', 'resource2Id', 'resource2Name', 'modelId', 'metric1Min', 'metric1Max', 'metric2Min', 'metric2Max', 'metricName1', 'metricName2', 'displayPercent']; const mediaProps = ['type', 'mediaType', 'newTab', 'elementUrl', 'imageName', 'centreonImageId', 'label']; From dcc305092a0865b4cd8e9280325cdaab5dd93c40 Mon Sep 17 00:00:00 2001 From: gfontaineCentreon Date: Thu, 23 Apr 2026 12:07:58 +0200 Subject: [PATCH 5/7] fix(drawio): rework pr --- src/main/webapp/js/diagramly/EditorUi.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index 126cabe9aa..efae277ed0 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -15259,6 +15259,7 @@ var graph = this.editor.graph; var cell = graph.getSelectionCell() || graph._centreonEditCell; + graph._centreonEditCell = null; var cellValue = graph.getModel().getValue(cell); cellValue = cellValue.cloneNode(true); From d11dd307949c46cc736f0581852cc142a6b5635c Mon Sep 17 00:00:00 2001 From: gfontaineCentreon Date: Thu, 23 Apr 2026 12:10:01 +0200 Subject: [PATCH 6/7] fix(drawio): rework pr --- src/main/webapp/js/app.min.js | 4 ++-- src/main/webapp/js/viewer-static.min.js | 6 +++--- src/main/webapp/js/viewer.min.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 5fed6bf566..7b604ef89a 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -11922,8 +11922,8 @@ mxResources.get("invalidOrMissingFile")),!ca){M=null!=Z?this.editor.extractGraph mxUtils.parseXml(J.xml).documentElement:null,ca=Editor.extractParserError(Z,mxResources.get("invalidOrMissingFile")),ca||(M=null!=Z?this.editor.extractGraphModel(Z,!0):null,null!=M&&(Z=M),null!=Z&&(this.editor.setGraphXml(Z),this.editor.setModified(!1)));else if("Save"==J.action)this.actions.get("save").funct();else if("Exit"==J.action)this.actions.get("exit").funct();else if("merge"==J.action){var ha=this.getCurrentFile();null!=ha&&(M=v(J.xml),null!=M&&""!=M&&ha.mergeFile(new LocalFile(this,M),function(){D.postMessage(JSON.stringify({event:"merge", message:J}),"*")},function(ba){D.postMessage(JSON.stringify({event:"merge",message:J,error:ba}),"*")}))}else if("remoteInvokeReady"==J.action)this.handleRemoteInvokeReady(D);else if("remoteInvoke"==J.action)this.handleRemoteInvoke(J,G.origin);else if("remoteInvokeResponse"==J.action)this.handleRemoteInvokeResponse(J);else if("setStyleProperties"===J.action){N=this.editor.graph;if("ResourcesAndContainer"===J.shapes){for(var Fa=["RESOURCE","CONTAINER"],Ba=N.getSelectionCells().filter(function(ba){ba= ba.getAttribute("type");return Fa.includes(ba)}),ya=$jscomp.makeIterator(Object.entries(J.data)),xa=ya.next();!xa.done;xa=ya.next()){var fa=$jscomp.makeIterator(xa.value),Oa=fa.next().value,Ka=fa.next().value;"style"===Oa&&N.handleCentreonStyleChangeForCells(Ba,Ka);N.setCellStyles(Oa,Ka,Ba)}return}for(var sa=N.getSelectionCell(),Da=N.getModel().getStyle(sa),na=$jscomp.makeIterator(Object.entries(J.data)),Ja=na.next();!Ja.done;Ja=na.next()){var qa=$jscomp.makeIterator(Ja.value),za=qa.next().value, -Aa=qa.next().value;if(Da.includes(za)){var La=new RegExp(za+"=(.+?);","g");"style"===za&&N.handleCentreonStyleChange(sa,Da,Aa);Da=Da.replace(La,za+"="+Aa+";")}}N.getModel().setStyle(sa,Da)}else if("setDataProperties"===J.action){N=this.editor.graph;sa=N.getSelectionCell()||N._centreonEditCell;var ja=N.getModel().getValue(sa);ja=ja.cloneNode(!0);void 0!==J&&void 0!==J.data&&Object.entries(J.data).forEach(function(ba){var ia=$jscomp.makeIterator(ba);ba=ia.next().value;ia=ia.next().value;ja.setAttribute(ba, -ia)});if("CONTAINER"===sa.getAttribute("type")&&0 Date: Tue, 28 Apr 2026 17:39:27 +0200 Subject: [PATCH 7/7] fix(drawio): add comments --- src/main/webapp/js/diagramly/EditorUi.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index efae277ed0..2ce2cec5cf 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -15237,6 +15237,8 @@ return; } + // Unlike setDataProperties, no Centreon wizard that stores graph._centreonEditCell + // ever sends setStyleProperties, so graph.getSelectionCell() is sufficient here. var cell = graph.getSelectionCell(); var cellStyle = graph.getModel().getStyle(cell); @@ -15258,6 +15260,7 @@ var graph = this.editor.graph; + // Fallback to _centreonEditCell because opening the wizard shifts focus to the iframe, which clears the graph selection before setDataProperties is received. var cell = graph.getSelectionCell() || graph._centreonEditCell; graph._centreonEditCell = null; var cellValue = graph.getModel().getValue(cell);