diff --git a/ChangeLog b/ChangeLog index 905172b37..6a0e94b1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +05-MAR-2024: 24.0.2 + +- Fixes DRAWIO_SERVER_URL if query string contains forward slash +- Handles double-quotes in page URLs +- Fixes waypoints for grouped edges [drawio-desktop-1646] +- Fixes ignored null bytes in mxUtils.trim + 02-MAR-2024: 24.0.1 - Updates DOMPurify from 3.0.8 to 3.0.9 diff --git a/VERSION b/VERSION index 517a3f076..a5b639c78 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.0.1 \ No newline at end of file +24.0.2 \ No newline at end of file diff --git a/src/main/mxgraph/util/mxUtils.js b/src/main/mxgraph/util/mxUtils.js index b62739e2d..1c7cb6cfe 100644 --- a/src/main/mxgraph/util/mxUtils.js +++ b/src/main/mxgraph/util/mxUtils.js @@ -3021,7 +3021,7 @@ var mxUtils = */ ltrim: function(str, chars) { - chars = chars || "\\s"; + chars = chars || "\\s|\\0"; return (str != null) ? str.replace(new RegExp("^[" + chars + "]+", "g"), "") : null; }, @@ -3041,7 +3041,7 @@ var mxUtils = */ rtrim: function(str, chars) { - chars = chars || "\\s"; + chars = chars || "\\s|\\0"; return (str != null) ? str.replace(new RegExp("[" + chars + "]+$", "g"), "") : null; }, diff --git a/src/main/mxgraph/view/mxGraph.js b/src/main/mxgraph/view/mxGraph.js index c2d90fb5f..3e80cb2cd 100644 --- a/src/main/mxgraph/view/mxGraph.js +++ b/src/main/mxgraph/view/mxGraph.js @@ -4025,6 +4025,9 @@ mxGraph.prototype.groupCells = function(group, border, cells) this.model.setGeometry(group, new mxGeometry()); } + // Resizes the group + this.cellsResized([group], [bounds], false); + // Adds the group into the parent var index = this.model.getChildCount(parent); this.cellsAdded([group], parent, index, null, null, false, false, false); @@ -4033,10 +4036,7 @@ mxGraph.prototype.groupCells = function(group, border, cells) index = this.model.getChildCount(group); this.cellsAdded(cells, group, index, null, null, false, false, false); this.cellsMoved(cells, -bounds.x, -bounds.y, false, false, false); - - // Resizes the group - this.cellsResized([group], [bounds], false); - + this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS, 'group', group, 'border', border, 'cells', cells)); } @@ -4855,7 +4855,19 @@ mxGraph.prototype.cellsAdded = function(cells, parent, index, source, target, ab index--; } + // Stops maintaining edge parent on edges that are being added + var updateEdgeParent = this.model.updateEdgeParent; + + this.model.updateEdgeParent = function(edge, root) + { + if (mxUtils.indexOf(cells, edge) < 0) + { + updateEdgeParent.apply(this, arguments); + } + }; + this.model.add(parent, cells[i], index + i); + this.model.updateEdgeParent = updateEdgeParent; if (this.autoSizeCellsOnAdd) { @@ -7687,13 +7699,13 @@ mxGraph.prototype.getBoundingBoxFromGeometry = function(cells, includeEdges, { if (pt != null) { - if (tmp == null) + if (bbox == null) { - tmp = new mxRectangle(pt.x, pt.y, 0, 0); + bbox = new mxRectangle(pt.x, pt.y, 0, 0); } else { - tmp.add(new mxRectangle(pt.x, pt.y, 0, 0)); + bbox.add(new mxRectangle(pt.x, pt.y, 0, 0)); } } }; @@ -7710,18 +7722,14 @@ mxGraph.prototype.getBoundingBoxFromGeometry = function(cells, includeEdges, var pts = geo.points; - if (pts != null && pts.length > 0) + if (pts != null) { - var tmp = new mxRectangle(pts[0].x, pts[0].y, 0, 0); - - for (var j = 1; j < pts.length; j++) + for (var j = 0; j < pts.length; j++) { addPoint(pts[j]); } } - bbox = tmp; - if (bbox != null && this.model.isVertex(parent) && mxUtils.indexOf( (ancestors != null) ? ancestors : cells, parent) >= 0) { diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index cf837fbf8..2a19ba07d 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -126,7 +126,7 @@ return b}();return{canvas:function(b,a){return new ua(b,a)},svg:function(b,a){re var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d=0;for(null!=b&&b||(a=Base64._utf8_encode(a));d>2;e=(e&3)<<4|b>>4;var k=(b&15)<<2|f>>6;var l=f&63;isNaN(b)?k=l=64:isNaN(f)&&(l=64);c=c+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(k)+this._keyStr.charAt(l)}return c},decode:function(a,b){b=null!=b?b:!1;var c="",d=0;for(a=a.replace(/[^A-Za-z0-9\+\/=]/g, "");d>4;f=(f&15)<<4|g>>2;var l=(g&3)<<6|k;c+=String.fromCharCode(e);64!=g&&(c+=String.fromCharCode(f));64!=k&&(c+=String.fromCharCode(l))}b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d): (127d?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0;for(c1=c2=0;cd?(b+=String.fromCharCode(d),c++):191d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3)}return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=!0;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net"); -window.DRAWIO_SERVER_URL=window.DRAWIO_SERVER_URL||window.location.href.substring(0,window.location.href.lastIndexOf("/"))+"/";window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"math/es5";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.diagrams.net/VsdConverter/api/converter"; +window.DRAWIO_SERVER_URL=window.DRAWIO_SERVER_URL||window.location.origin+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/";window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"math/es5";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.diagrams.net/VsdConverter/api/converter"; window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.diagrams.net/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||window.DRAWIO_SERVER_URL+"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"2b14debc5feeb18ba65358d863ec870e4cc9294b28c3c941cb3014eb4af9a9b4";window.DRAWIO_GITHUB_URL=window.DRAWIO_GITHUB_URL||"https://github.com";window.DRAWIO_GITHUB_API_URL=window.DRAWIO_GITHUB_API_URL||"https://api.github.com"; window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.DRAWIO_DROPBOX_ID=window.DRAWIO_DROPBOX_ID||"jg02tc0onwmhlgm";window.SAVE_URL=window.SAVE_URL||window.DRAWIO_SERVER_URL+"save";window.OPEN_URL=window.OPEN_URL||window.DRAWIO_SERVER_URL+"import";window.PROXY_URL=window.PROXY_URL||window.DRAWIO_SERVER_URL+"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.NOTIFICATIONS_URL=window.NOTIFICATIONS_URL||window.DRAWIO_SERVER_URL+"notifications"; window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||(urlParams.dev&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_SERVER_URL+"iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates"; @@ -146,7 +146,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -201,9 +201,9 @@ m){mxUtils.get(l,function(n){var p=n.getStatus();200>p||299mxUtils.indexOf(b,e))&&(d[e]=c||"object"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d}, equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c [Function]\n";else if("object"==typeof a[c]){var d= -mxUtils.getFunctionName(a[c].constructor);b+=c+" => ["+d+"]\n"}else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return F;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);F=Math.sin(e*Math.PI/180);e=p*m+F*n;m=-1*F*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=F;d*=F;var v=Math.cos(f),z=Math.sin(f);q=-m*(n*z+d*v);r=-m*(c*z-p*v);for(var F=[],C=0;C ["+d+"]\n"}else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return E;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);E=Math.sin(e*Math.PI/180);e=p*m+E*n;m=-1*E*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=E;d*=E;var v=Math.cos(f),z=Math.sin(f);q=-m*(n*z+d*v);r=-m*(c*z-p*v);for(var E=[],C=0;Cc&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH; break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|= @@ -217,7 +217,7 @@ d,e,f){d=null!=d?d:1;e=null!=e?e:0;f=null!=f?f:0;if(0a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a, +11);)a=a.substring(a.toLowerCase().indexOf(":")+1);return a},ltrim:function(a,b){return null!=a?a.replace(new RegExp("^["+(b||"\\s|\\0")+"]+","g"),""):null},rtrim:function(a,b){return null!=a?a.replace(new RegExp("["+(b||"\\s|\\0")+"]+$","g"),""):null},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a, b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,k){var l=(k-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(k-f)*(a-e))/l;e=((c-a)*(b-f)-(d-b)*(a-e))/l;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},ptLineDist:function(a,b,c,d,e,f){return Math.abs((d-b)*e-(c-a)*f+c*b-d*a)/Math.sqrt((d-b)*(d-b)+(c-a)*(c-a))},relativeCcw:function(a,b, c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0a&&(a=0)));return 0>a?-1:0document.documentMode)?a.style.filter=100<=b?"":"alpha(opacity="+b+")": a.style.opacity=b/100},createElementNs:function(a,b,c){if(null!=a.createElementNS)return a.createElementNS(b,c);a=a.createElement(c);null!=namespace&&a.setAttribute("xmlns",b);return a},createImage:function(a){var b=document.createElement("img");b.setAttribute("src",a);b.setAttribute("border","0");return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(d,e){var f=c.get(d);null==f&&(f=mxCellPath.create(d).split(mxCellPath.PATH_SEPARATOR),c.put(d,f));d=c.get(e);null== @@ -503,9 +503,9 @@ document?c.appendChild(a.cloneNode(!0)):c.appendChild(a);d.appendChild(c);b.appe mxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t){var u=this.addTitle(this.createElement("g")),v=this.createElement("foreignObject");this.setCssText(v,"overflow: visible; text-align: left;");v.setAttribute("pointer-events","none");r.ownerDocument!=document&&(r=mxUtils.importNodeImplementation(v.ownerDocument,r,!0));v.appendChild(r);u.appendChild(v);this.updateTextNodes(a,b,c,d,f,g,k,m,n,p,q,u);this.root.ownerDocument!=document&&(a=this.createAlternateContent(v,a,b,c, d,e,f,g,k,l,m,n,p),null!=a&&(v.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),b=this.createElement("switch"),b.appendChild(v),b.appendChild(a),u.appendChild(b)));t.appendChild(u)}; mxSvgCanvas2D.prototype.updateTextNodes=function(a,b,c,d,e,f,g,k,l,m,n,p){var q=this.state.scale,r="",t="";null!=n&&"vertical-"==n.substring(0,9)?(r="-rl"==n.substring(n.length-3),t=e==mxConstants.ALIGN_LEFT?r?"flex-end":"flex-start":e==mxConstants.ALIGN_RIGHT?r?"flex-start":"flex-end":"center",r=f==mxConstants.ALIGN_TOP?"flex-start":f==mxConstants.ALIGN_BOTTOM?"flex-end":"center"):(t=f==mxConstants.ALIGN_TOP?"flex-start":f==mxConstants.ALIGN_BOTTOM?"flex-end":"center",r=e==mxConstants.ALIGN_LEFT? -"flex-start":e==mxConstants.ALIGN_RIGHT?"flex-end":"center");mxSvgCanvas2D.createCss(c+this.foreignObjectPadding,d,e,f,g,k,l,n,null!=this.state.fontBackgroundColor?this.state.fontBackgroundColor:null,null!=this.state.fontBorderColor?this.state.fontBorderColor:null,"display: flex; align-items: unsafe "+t+"; justify-content: unsafe "+r+"; "+(null!=n&&"vertical-"==n.substring(0,9)?"writing-mode: "+n+";":""),this.getTextCss(),q,mxUtils.bind(this,function(u,v,z,F,C){a+=this.state.dx;b+=this.state.dy;var E= -p.firstChild;"title"==E.nodeName&&(E=E.nextSibling);var B=E.firstChild,x=B.firstChild,y=(this.rotateHtml?this.state.rotation:0)+(null!=m?m:0),D=(0!=this.foOffset?"translate("+this.foOffset+" "+this.foOffset+")":"")+(1!=q?"scale("+q+")":"");this.setCssText(x.firstChild,C);this.setCssText(x,F);x.setAttribute("data-drawio-colors","color: "+this.state.fontColor+"; "+(null==this.state.fontBackgroundColor?"":"background-color: "+this.state.fontBackgroundColor+"; ")+(null==this.state.fontBorderColor?"": -"border-color: "+this.state.fontBorderColor+"; "));E.setAttribute("width",Math.ceil(1/Math.min(1,q)*100)+"%");E.setAttribute("height",Math.ceil(1/Math.min(1,q)*100)+"%");v=Math.round(b+v);0>v?(E.setAttribute("y",v),z+="padding-top: 0; "):(E.removeAttribute("y"),z+="padding-top: "+v+"px; ");this.setCssText(B,z+"margin-left: "+Math.round(a+u)+"px;");D+=0!=y?"rotate("+y+" "+a+" "+b+")":"";""!=D?p.setAttribute("transform",D):p.removeAttribute("transform");1!=this.state.alpha?p.setAttribute("opacity", +"flex-start":e==mxConstants.ALIGN_RIGHT?"flex-end":"center");mxSvgCanvas2D.createCss(c+this.foreignObjectPadding,d,e,f,g,k,l,n,null!=this.state.fontBackgroundColor?this.state.fontBackgroundColor:null,null!=this.state.fontBorderColor?this.state.fontBorderColor:null,"display: flex; align-items: unsafe "+t+"; justify-content: unsafe "+r+"; "+(null!=n&&"vertical-"==n.substring(0,9)?"writing-mode: "+n+";":""),this.getTextCss(),q,mxUtils.bind(this,function(u,v,z,E,C){a+=this.state.dx;b+=this.state.dy;var F= +p.firstChild;"title"==F.nodeName&&(F=F.nextSibling);var B=F.firstChild,x=B.firstChild,y=(this.rotateHtml?this.state.rotation:0)+(null!=m?m:0),D=(0!=this.foOffset?"translate("+this.foOffset+" "+this.foOffset+")":"")+(1!=q?"scale("+q+")":"");this.setCssText(x.firstChild,C);this.setCssText(x,E);x.setAttribute("data-drawio-colors","color: "+this.state.fontColor+"; "+(null==this.state.fontBackgroundColor?"":"background-color: "+this.state.fontBackgroundColor+"; ")+(null==this.state.fontBorderColor?"": +"border-color: "+this.state.fontBorderColor+"; "));F.setAttribute("width",Math.ceil(1/Math.min(1,q)*100)+"%");F.setAttribute("height",Math.ceil(1/Math.min(1,q)*100)+"%");v=Math.round(b+v);0>v?(F.setAttribute("y",v),z+="padding-top: 0; "):(F.removeAttribute("y"),z+="padding-top: "+v+"px; ");this.setCssText(B,z+"margin-left: "+Math.round(a+u)+"px;");D+=0!=y?"rotate("+y+" "+a+" "+b+")":"";""!=D?p.setAttribute("transform",D):p.removeAttribute("transform");1!=this.state.alpha?p.setAttribute("opacity", this.state.alpha):p.removeAttribute("opacity")}))}; mxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r){k=null!=k&&"vertical-"==k.substring(0,9);q="box-sizing: border-box; font-size: 0; ";q=k?q+("text-align: "+(d==mxConstants.ALIGN_TOP?"left":d==mxConstants.ALIGN_BOTTOM?"right":"center")+"; "):q+("text-align: "+(c==mxConstants.ALIGN_LEFT?"left":c==mxConstants.ALIGN_RIGHT?"right":"center")+"; ");var t=mxUtils.getAlignmentAsPoint(c,d);c="overflow: hidden; ";var u="width: 1px; ",v="height: 1px; ",z=t.x*a;t=t.y*b;g?(u="width: "+Math.round(a)+ "px; ",q+="max-height: "+Math.round(b)+"px; ",t=0):"fill"==f?(u="width: "+Math.round(a)+"px; ",v="height: "+Math.round(b)+"px; ",p+="width: 100%; height: 100%; ",q+="width: "+Math.round(a-2)+"px; "+v):"width"==f?(u="width: "+Math.round(a-2)+"px; ",p+="width: 100%; ",q+=u,t=0,0>1,++e[f];return c}; -mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;){var e=1==a%2&&1==d%2;c=!1;for(var f=0;fn&&(n=l);k[n]=m}var p=null,q=null,r=null,t=null,u=null;for(l=0;lr[x]&&E++,z[C]t[x]&&E++,F[C]d++;){var e=1==a%2&&1==d%2;c=!1;for(var f=0;fn&&(n=l);k[n]=m}var p=null,q=null,r=null,t=null,u=null;for(l=0;lr[x]&&F++,z[C]t[x]&&F++,E[C]a.medianValue?-1:b.medianValuef/2&&(p-=this.prefVertEdgeOff),t=0;t':8");l.writeln("");l.writeln("");this.writeHead(l,a);l.writeln("");l.writeln('')}var n=mxRectangle.fromRectangle(this.graph.getGraphBounds()),p=this.graph.getView().getScale(),q=p/this.scale,r=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=r.x*this.scale,this.y0-=r.y*this.scale,n.width+=n.x,n.height+=n.y,n.x=0,this.border=n.y=0);var t=this.pageFormat.width-2*this.border, -u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;n.width/=q;n.height/=q;var v=Math.max(1,Math.ceil((n.width+this.x0)/t)),z=Math.max(1,Math.ceil((n.height+this.y0)/u));this.pageCount=v*z;var F=mxUtils.bind(this,function(){if(this.pageSelector&&(1");a.writeln("");a.close();mxEvent.release(a.body)}}catch(b){}}; mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln(""+mxUtils.htmlEntities(this.title)+"");mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('")};return e};PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(b){function e(){var l=S;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(I.style.backgroundImage="url("+l.src+")",I.style.display="inline-block"):(I.style.backgroundImage="",I.style.display="none");I.style.backgroundColor="";null!=W&&W!=mxConstants.NONE&&(I.style.backgroundColor=W,I.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody"); +var PageSetupDialog=function(b){function e(){var l=R;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(I.style.backgroundImage="url("+l.src+")",I.style.display="inline-block"):(I.style.backgroundImage="",I.style.display="none");I.style.backgroundColor="";null!=W&&W!=mxConstants.NONE&&(I.style.backgroundColor=W,I.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody"); var q=document.createElement("tr");var A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";mxUtils.write(A,mxResources.get("paperSize")+":");q.appendChild(A);A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(A,"pagesetupdialog",g.pageFormat);q.appendChild(A);t.appendChild(q);q=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("gridSize")+":");q.appendChild(A); -A=document.createElement("td");A.style.whiteSpace="nowrap";var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","0");R.style.width="40px";R.style.marginLeft="6px";R.value=g.getGridSize();A.appendChild(R);mxEvent.addListener(R,"change",function(){var l=parseInt(R.value);R.value=Math.max(1,isNaN(l)?g.getGridSize():l)});q.appendChild(A);t.appendChild(q);q=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":"); +A=document.createElement("td");A.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();A.appendChild(S);mxEvent.addListener(S,"change",function(){var l=parseInt(S.value);S.value=Math.max(1,isNaN(l)?g.getGridSize():l)});q.appendChild(A);t.appendChild(q);q=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":"); q.appendChild(A);A=document.createElement("td");var F=document.createElement("button");F.className="geBtn";F.style.margin="0px";mxUtils.write(F,mxResources.get("change")+"...");var I=document.createElement("div");I.style.display="inline-block";I.style.verticalAlign="middle";I.style.backgroundPosition="center center";I.style.backgroundRepeat="no-repeat";I.style.backgroundSize="contain";I.style.border="1px solid lightGray";I.style.borderRadius="4px";I.style.marginRight="14px";I.style.height="32px"; -I.style.width="64px";I.style.cursor="pointer";I.style.padding="4px";var S=g.backgroundImage,W=g.background,d=g.shadowVisible,f=function(l){b.showBackgroundImageDialog(function(z,y,B,G){y||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),S=z,d=G);W=B;e()},S,W,!0);mxEvent.consume(l)};mxEvent.addListener(F,"click",f);mxEvent.addListener(I,"click",f);e();A.appendChild(I);A.appendChild(F);q.appendChild(A);t.appendChild(q);q=document.createElement("tr");A=document.createElement("td"); -A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);f=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var l=parseInt(R.value);isNaN(l)||g.gridSize===l||g.setGridSize(l);l=new ChangePageSetup(b,W,S,H.get());l.ignoreColor=g.background==W;l.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=S?S.src:null);null!=d&& -(l.shadowVisible=d);g.pageFormat.width==l.previousFormat.width&&g.pageFormat.height==l.previousFormat.height&&l.ignoreColor&&l.ignoreImage&&l.shadowVisible==g.shadowVisible||g.model.execute(l)});f.className="geBtn gePrimaryBtn";A.appendChild(f);b.editor.cancelFirst||A.appendChild(F);q.appendChild(A);t.appendChild(q);n.appendChild(t);this.container=n}; -PageSetupDialog.addPageFormatPanel=function(b,e,g,n){function t(O,J,ja){if(ja||S!=document.activeElement&&W!=document.activeElement){O=!1;for(J=0;J=O)S.value=g.width/100;O=parseFloat(W.value);if(isNaN(O)||0>=O)W.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100* -parseFloat(S.value)),Math.floor(100*parseFloat(W.value)));"custom"!=H.value&&A.checked&&(O=new mxRectangle(0,0,O.height,O.width));J&&B||O.width==G.width&&O.height==G.height||(G=O,null!=n&&n(G))};mxEvent.addListener(e,"click",function(O){q.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(F,"click",function(O){A.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(S,"blur",M);mxEvent.addListener(S,"click",M);mxEvent.addListener(W,"blur",M);mxEvent.addListener(W,"click",M);mxEvent.addListener(A, -"change",M);mxEvent.addListener(q,"change",M);mxEvent.addListener(H,"change",function(O){B="custom"==H.value;M(O,!0)});M();return{set:function(O){g=O;t(null,null,!0)},get:function(){return G},widthInput:S,heightInput:W}}; +I.style.width="64px";I.style.cursor="pointer";I.style.padding="4px";var R=g.backgroundImage,W=g.background,c=g.shadowVisible,f=function(l){b.showBackgroundImageDialog(function(z,y,B,G){y||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,c=G);W=B;e()},R,W,!0);mxEvent.consume(l)};mxEvent.addListener(F,"click",f);mxEvent.addListener(I,"click",f);e();A.appendChild(I);A.appendChild(F);q.appendChild(A);t.appendChild(q);q=document.createElement("tr");A=document.createElement("td"); +A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);f=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var l=parseInt(S.value);isNaN(l)||g.gridSize===l||g.setGridSize(l);l=new ChangePageSetup(b,W,R,H.get());l.ignoreColor=g.background==W;l.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=c&& +(l.shadowVisible=c);g.pageFormat.width==l.previousFormat.width&&g.pageFormat.height==l.previousFormat.height&&l.ignoreColor&&l.ignoreImage&&l.shadowVisible==g.shadowVisible||g.model.execute(l)});f.className="geBtn gePrimaryBtn";A.appendChild(f);b.editor.cancelFirst||A.appendChild(F);q.appendChild(A);t.appendChild(q);n.appendChild(t);this.container=n}; +PageSetupDialog.addPageFormatPanel=function(b,e,g,n){function t(O,J,ja){if(ja||R!=document.activeElement&&W!=document.activeElement){O=!1;for(J=0;J=O)R.value=g.width/100;O=parseFloat(W.value);if(isNaN(O)||0>=O)W.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100* +parseFloat(R.value)),Math.floor(100*parseFloat(W.value)));"custom"!=H.value&&A.checked&&(O=new mxRectangle(0,0,O.height,O.width));J&&B||O.width==G.width&&O.height==G.height||(G=O,null!=n&&n(G))};mxEvent.addListener(e,"click",function(O){q.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(F,"click",function(O){A.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(R,"blur",M);mxEvent.addListener(R,"click",M);mxEvent.addListener(W,"blur",M);mxEvent.addListener(W,"click",M);mxEvent.addListener(A, +"change",M);mxEvent.addListener(q,"change",M);mxEvent.addListener(H,"change",function(O){B="custom"==H.value;M(O,!0)});M();return{set:function(O){g=O;t(null,null,!0)},get:function(){return G},widthInput:R,heightInput:W}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(b,e,g,n,t,q,A,H,R,F,I){R=null!=R?R:!0;var S=document.createElement("div"),W=document.createElement("div");W.style.width="100%";W.style.display="grid";W.style.gap="5px 8px";W.style.gridAutoColumns="auto 1fr";W.style.boxSizing="border-box";W.style.padding="3px";var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.justifyContent="flex-end";d.style.minWidth="0";var f=document.createElement("div");f.style.display="inline-block"; -f.style.textOverflow="ellipsis";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="10pt";f.style.padding="2px 0";f.setAttribute("title",t||mxResources.get("filename"));mxUtils.write(f,(t||mxResources.get("filename"))+":");d.appendChild(f);W.appendChild(d);var l=document.createElement("input");l.setAttribute("value",e||"");l.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==q||q(l.value))R&&b.hideDialog(),n(l.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!= +var FilenameDialog=function(b,e,g,n,t,q,A,H,S,F,I){S=null!=S?S:!0;var R=document.createElement("div"),W=document.createElement("div");W.style.width="100%";W.style.display="grid";W.style.gap="5px 8px";W.style.gridAutoColumns="auto 1fr";W.style.boxSizing="border-box";W.style.padding="3px";var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.justifyContent="flex-end";c.style.minWidth="0";var f=document.createElement("div");f.style.display="inline-block"; +f.style.textOverflow="ellipsis";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="10pt";f.style.padding="2px 0";f.setAttribute("title",t||mxResources.get("filename"));mxUtils.write(f,(t||mxResources.get("filename"))+":");c.appendChild(f);W.appendChild(c);var l=document.createElement("input");l.setAttribute("value",e||"");l.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==q||q(l.value))S&&b.hideDialog(),n(l.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!= t||null==A)if(null!=I?Editor.selectFilename(l):(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var y=W.parentNode;if(null!=y){var B=null;mxEvent.addListener(y,"dragleave",function(G){null!=B&&(B.style.backgroundColor="",B=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(G){null==B&&(!mxClient.IS_IE||10'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var R=this.view.canvas; -null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+H,F))+"px";R.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,H,R){var F=this.view.scale,I=this.view.translate,S=this.pageFormat,W=F*this.pageScale,d=this.view.getBackgroundPageBounds();H=d.width;R=d.height;var f=new mxRectangle(F* -I.x,F*I.y,S.width*W,S.height*W),l=(A=A&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(R/f.height)-1:0,z=A?Math.ceil(H/f.width)-1:0,y=d.x+H,B=d.y+R;null==this.horizontalPageBreaks&&0'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas; +null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+H,F))+"px";S.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,H,S){var F=this.view.scale,I=this.view.translate,R=this.pageFormat,W=F*this.pageScale,c=this.view.getBackgroundPageBounds();H=c.width;S=c.height;var f=new mxRectangle(F* +I.x,F*I.y,R.width*W,R.height*W),l=(A=A&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,z=A?Math.ceil(H/f.width)-1:0,y=c.x+H,B=c.y+S;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):t.panningHandler.usePopupTrigger=!1;t.init(this.diagramContainer);mxClient.IS_SVG&&null!=t.view.getDrawPane()&& (e=t.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=t.graphHandler){var I=t.graphHandler.start;t.graphHandler.start=function(){null!=n.hoverIcons&&n.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(T){var ca=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,T)&&(T.parentNode.removeChild(T),ca.push(T));T=ka}T=this.toolbar.fontMenu;ka=this.toolbar.sizeMenu;if(null==B)this.toolbar.createTextToolbar();else{for(var ma=0;maA.length?35*A.length:140;W.className="geToolbarContainer geSidebarContainer geShapePicker";W.setAttribute("title",mxResources.get("sidebarTooltip"));W.style.left=b+"px";W.style.top=e+"px";W.style.width=t+"px";mxClient.IS_POINTER&&(W.style.touchAction="none");H||mxUtils.setPrefixedStyle(W.style,"transform","translate(-22px,-22px)");null!=S.background&&S.background!=mxConstants.NONE&&(W.style.backgroundColor= -S.background);S.container.appendChild(W);t=mxUtils.bind(this,function(l){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px";W.appendChild(z);null!=f&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(f,[l]):this.sidebar.graph.pasteCellStyles([l],S.currentVertexStyle,S.currentEdgeStyle);var y=l.geometry;S.model.isEdge(l)&&(y=y.getTerminalPoint(!1),y=new mxRectangle(0, -0,y.x,y.y));null!=y&&z.appendChild(this.sidebar.createVertexTemplateFromCells([l],y.width,y.height,"",!0,!1,null,!1,mxUtils.bind(this,function(B){if(!mxEvent.isShiftDown(B)||null==g&&S.isSelectionEmpty()){var G=S.cloneCell(l);if(null!=n)n(G);else{var M=R([G]);S.model.isEdge(G)?G.geometry.translate(M.x,M.y):(G.geometry.x=M.x,G.geometry.y=M.y);S.model.beginUpdate();try{S.addCell(G),S.model.isVertex(G)&&S.isAutoSizeCell(G)&&S.updateCellSize(G)}finally{S.model.endUpdate()}S.setSelectionCell(G);S.scrollCellToVisible(G); -I&&S.startEditing(G);null!=d.hoverIcons&&d.hoverIcons.update(S.view.getState(G))}}else G=S.getEditableCells(null!=g?[g]:S.getSelectionCells()),S.updateShapes(l,G);null!=q&&q(B);mxEvent.consume(B)}),25,25,null,null,g))});for(F=0;F<(H?Math.min(A.length,4):A.length);F++)t(A[F]);A=W.offsetTop+W.clientHeight-(S.container.scrollTop+S.container.offsetHeight);0A.length?35*A.length:140;W.className="geToolbarContainer geSidebarContainer geShapePicker";W.setAttribute("title",mxResources.get("sidebarTooltip"));W.style.left=b+"px";W.style.top=e+"px";W.style.width=t+"px";mxClient.IS_POINTER&&(W.style.touchAction="none");H||mxUtils.setPrefixedStyle(W.style,"transform","translate(-22px,-22px)");null!=R.background&&R.background!=mxConstants.NONE&&(W.style.backgroundColor= +R.background);R.container.appendChild(W);t=mxUtils.bind(this,function(l){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px";W.appendChild(z);null!=f&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(f,[l]):this.sidebar.graph.pasteCellStyles([l],R.currentVertexStyle,R.currentEdgeStyle);var y=l.geometry;R.model.isEdge(l)&&(y=y.getTerminalPoint(!1),y=new mxRectangle(0, +0,y.x,y.y));null!=y&&z.appendChild(this.sidebar.createVertexTemplateFromCells([l],y.width,y.height,"",!0,!1,null,!1,mxUtils.bind(this,function(B){if(!mxEvent.isShiftDown(B)||null==g&&R.isSelectionEmpty()){var G=R.cloneCell(l);if(null!=n)n(G);else{var M=S([G]);R.model.isEdge(G)?G.geometry.translate(M.x,M.y):(G.geometry.x=M.x,G.geometry.y=M.y);R.model.beginUpdate();try{R.addCell(G),R.model.isVertex(G)&&R.isAutoSizeCell(G)&&R.updateCellSize(G)}finally{R.model.endUpdate()}R.setSelectionCell(G);R.scrollCellToVisible(G); +I&&R.startEditing(G);null!=c.hoverIcons&&c.hoverIcons.update(R.view.getState(G))}}else G=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(l,G);null!=q&&q(B);mxEvent.consume(B)}),25,25,null,null,g))});for(F=0;F<(H?Math.min(A.length,4):A.length);F++)t(A[F]);A=W.offsetTop+W.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](n)};EditorUi.prototype.writeHtmlToClipboard=function(b,e){b=new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(b)],{type:"text/plain"}),"text/html":new Blob([b],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)}; EditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("<mxGraphModel ");if(0<=g){var n=b.lastIndexOf("</mxGraphModel>");n>g&&(e=b.substring(g,n+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(t){}return e}; EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var n=decodeURIComponent(g);this.isCompatibleString(n)&&(g=n)}b(g)}),"text")}),"html")}; EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0k||Math.abs(A.y-V.getGraphY())>k){var D=null;mxEvent.isControlDown(V.getEvent())|| +V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){X=V.getProperty("event");var ba=X.getState();mxEvent.isAltDown(X.getEvent())||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V)||R||null==ba||!this.model.isEdge(ba.cell)||(A=new mxPoint(X.getGraphX(),X.getGraphY()),I=this.isCellSelected(ba.cell),S=ba,H=X,null!=ba.text&&null!=ba.text.boundingBox&&mxUtils.contains(ba.text.boundingBox,X.getGraphX(),X.getGraphY())?F=mxEvent.LABEL_HANDLE:(V=this.selectionCellsHandler.getHandler(ba.cell),null!= +V&&null!=V.bends&&0k||Math.abs(A.y-V.getGraphY())>k){var D=null;mxEvent.isControlDown(V.getEvent())|| mxEvent.isShiftDown(V.getEvent())||(D=this.selectionCellsHandler.getHandler(ba.cell));if(null!=D&&null!=D.bends&&0'+(""!=t?'":"")+'
'+b+"
")}; Graph.zapGremlins=function(b){for(var e=0,g=[],n=0;npageSize){var G=S.startIndex||0;y=z.slice(Math.max(0,G),Math.min(z.length,G+pageSize))}y=y.concat(n.getOpposites(y,l));var M=I.cloneCells(y);for(B=0;B(S.startIndex||0)+pageSize){var J=I.createVertex(null,null,mxResources.get("nextPage")+"...",0,0,100,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");J.referenceCell=f;J.startIndex=(S.startIndex||0)+pageSize;M.splice(0,0,J)}for(var ja in I.getModel().cells){var ea= -I.getModel().getCell(ja);ea!=I.rootCell&&!I.getModel().isAncestor(I.rootCell,ea)&&I.getModel().isVertex(ea)&&I.removeCells([ea])}I.addCells(M);var T=I.getModel().getGeometry(I.rootCell);null!=T&&(T=T.clone(),T.x=W-T.width/2,T.y=d-T.height/3,I.getModel().setGeometry(I.rootCell,T));S=[];for(ja in I.getModel().cells)ea=I.getModel().getCell(ja),ea!=I.rootCell&&I.getModel().isVertex(ea)&&I.getModel().getParent(ea)==I.getDefaultParent()&&(S.push(ea),T=I.getModel().getGeometry(ea),null!=T&&(T.x=W-T.width/ -2,T.y=d-T.height/2));var ca=S.length,ka=2*Math.PI/ca,ma=Math.max(minSize,Math.min(I.container.scrollWidth/3-80,I.container.scrollHeight/3-80));for(W=0;WpageSize){var G=R.startIndex||0;y=z.slice(Math.max(0,G),Math.min(z.length,G+pageSize))}y=y.concat(n.getOpposites(y,l));var M=I.cloneCells(y);for(B=0;B(R.startIndex||0)+pageSize){var J=I.createVertex(null,null,mxResources.get("nextPage")+"...",0,0,100,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");J.referenceCell=f;J.startIndex=(R.startIndex||0)+pageSize;M.splice(0,0,J)}for(var ja in I.getModel().cells){var ea= +I.getModel().getCell(ja);ea!=I.rootCell&&!I.getModel().isAncestor(I.rootCell,ea)&&I.getModel().isVertex(ea)&&I.removeCells([ea])}I.addCells(M);var T=I.getModel().getGeometry(I.rootCell);null!=T&&(T=T.clone(),T.x=W-T.width/2,T.y=c-T.height/3,I.getModel().setGeometry(I.rootCell,T));R=[];for(ja in I.getModel().cells)ea=I.getModel().getCell(ja),ea!=I.rootCell&&I.getModel().isVertex(ea)&&I.getModel().getParent(ea)==I.getDefaultParent()&&(R.push(ea),T=I.getModel().getGeometry(ea),null!=T&&(T.x=W-T.width/ +2,T.y=c-T.height/2));var ca=R.length,ka=2*Math.PI/ca,ma=Math.max(minSize,Math.min(I.container.scrollWidth/3-80,I.container.scrollHeight/3-80));for(W=0;WmxUtils.indexOf(R,I)})),this.updateCellStyles(A,H))};Graph.prototype.copyCellStyles=function(A,H,R,F,I,S,W){var d=!1,f=!1;if(0mxUtils.indexOf(Graph.edgeStyles,M))&&(d=mxUtils.setStyle(d,M,ca),"fontFamily"==M&&null==f.fontSource&&(d=mxUtils.setStyle(d,"fontSource",null)),T&&"rounded"==M&&"1"==ca&&null==f.curved&&(d=mxUtils.setStyle(d,"curved",null)))}Editor.simpleLabels&&(d=mxUtils.setStyle(mxUtils.setStyle(d,"html",null),"whiteSpace",null));this.model.setStyle(W,d)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,H){this.model.beginUpdate(); -try{for(var R=0;RmxUtils.indexOf(S,I)})),this.updateCellStyles(A,H))};Graph.prototype.copyCellStyles=function(A,H,S,F,I,R,W){var c=!1,f=!1;if(0mxUtils.indexOf(Graph.edgeStyles,M))&&(c=mxUtils.setStyle(c,M,ca),"fontFamily"==M&&null==f.fontSource&&(c=mxUtils.setStyle(c,"fontSource",null)),T&&"rounded"==M&&"1"==ca&&null==f.curved&&(c=mxUtils.setStyle(c,"curved",null)))}Editor.simpleLabels&&(c=mxUtils.setStyle(mxUtils.setStyle(c,"html",null),"whiteSpace",null));this.model.setStyle(W,c)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,H){this.model.beginUpdate(); +try{for(var S=0;SW?"a":"p",tt:12>W?"am":"pm",T:12>W?"A":"P",TT:12>W?"AM":"PM",Z:g?"UTC":(String(b).match(t)||[""]).pop().replace(q,""),o:(0W?"a":"p",tt:12>W?"am":"pm",T:12>W?"A":"P",TT:12>W?"AM":"PM",Z:g?"UTC":(String(b).match(t)||[""]).pop().replace(q,""),o:(0t&&"%"==e.charAt(match.index-1))A=q.substring(1);else{var H=q.substring(1,q.length-1);if("id"==H)A=b.id;else if("width"==H&&this.model.isVertex(b)){var R=this.getCellGeometry(b);null!=R&&(A=R.width)}else if("height"==H&&this.model.isVertex(b))R=this.getCellGeometry(b),null!=R&&(A=R.height);else if("length"== -H&&this.model.isEdge(b))R=this.view.getState(b),null!=R&&(A=Math.round(R.length/this.view.scale));else if(0>H.indexOf("{"))for(R=b;null==A&&null!=R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=R.getAttribute(H+"_"+Graph.diagramLanguage)),null==A&&(A=R.hasAttribute(H)?null!=R.getAttribute(H)?R.getAttribute(H):"":null)),R=this.model.getParent(R);null==A&&(A=this.getGlobalVariable(H));null==A&&null!=g&&(A=g[H])}n.push(e.substring(t,match.index)+(null!= +Graph.prototype.replacePlaceholders=function(b,e,g,n){n=[];if(null!=e){for(var t=0;match=this.placeholderPattern.exec(e);){var q=match[0];if(2t&&"%"==e.charAt(match.index-1))A=q.substring(1);else{var H=q.substring(1,q.length-1);if("id"==H)A=b.id;else if("width"==H&&this.model.isVertex(b)){var S=this.getCellGeometry(b);null!=S&&(A=S.width)}else if("height"==H&&this.model.isVertex(b))S=this.getCellGeometry(b),null!=S&&(A=S.height);else if("length"== +H&&this.model.isEdge(b))S=this.view.getState(b),null!=S&&(A=Math.round(S.length/this.view.scale));else if(0>H.indexOf("{"))for(S=b;null==A&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==A&&(A=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==A&&(A=this.getGlobalVariable(H));null==A&&null!=g&&(A=g[H])}n.push(e.substring(t,match.index)+(null!= A?A:q));t=match.index+q.length}}n.push(e.substring(t))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[q],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[q]]);this.setCellStyles("points",null,[e[q]]);this.pasteStyle(t,[e[q]],null,!0)}else t=this.copyStyle(e[q]),this.model.setStyle(e[q],n),this.pasteStyle(t,[e[q]]);"1"==mxUtils.getValue(this.getCellStyle(e[q],!1),"composite","0")&&this.removeChildCells(e[q])}}finally{this.model.endUpdate()}}; Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout}; Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))}; -Graph.prototype.connectVertex=function(b,e,g,n,t,q,A,H){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var R=this.isCloneConnectSource(b),F=R?b:this.getCompositeParent(b),I=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(F.geometry.x,F.geometry.y);e==mxConstants.DIRECTION_NORTH?(I.x+=F.geometry.width/2,I.y-=g):e== -mxConstants.DIRECTION_SOUTH?(I.x+=F.geometry.width/2,I.y+=F.geometry.height+g):(I.x=e==mxConstants.DIRECTION_WEST?I.x-g:I.x+(F.geometry.width+g),I.y+=F.geometry.height/2);var S=this.view.getState(this.model.getParent(b));g=this.view.scale;var W=this.view.translate;F=W.x*g;W=W.y*g;null!=S&&this.model.isVertex(S.cell)&&(F=S.x,W=S.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(I.x+=b.parent.geometry.x,I.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(F+I.x*g,W+I.y*g)).grow(40*g);q=null!=q? -this.getCells(0,0,0,0,null,null,q,null,!0):null;S=this.view.getState(b);var d=null,f=null;if(null!=q){q=q.reverse();for(var l=0;lmxUtils.indexOf(g,b[t].nodeName))&&0A.name?1:0});for(t= 0;t"+mxUtils.htmlEntities(n[t].name)+": ":"")+mxUtils.htmlEntities(n[t].value)+"\n");0'+e+""))}return e}; -Graph.prototype.addFlowAnimation=function(b,e,g,n){var t=b.getAttribute("stroke-dasharray");if(""==t||null==t){var q=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");t=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14); -HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,''):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,''):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14); -HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,''):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,''):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); -HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGhlaWdodD0iMzZweCI+PGVsbGlwc2UgZmlsbD0iIzI5YjZmMiIgY3g9IjEyIiBjeT0iMTIiIHJ4PSIxMiIgcnk9IjEyIi8+PHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjgpIHRyYW5zbGF0ZSgyLjQsIDIuNCkiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iI2ZmZiIgZD0iTTEyIDZ2M2w0LTQtNC00djNjLTQuNDIgMC04IDMuNTgtOCA4IDAgMS41Ny40NiAzLjAzIDEuMjQgNC4yNkw2LjcgMTQuOGMtLjQ1LS44My0uNy0xLjc5LS43LTIuOCAwLTMuMzEgMi42OS02IDYtNnptNi43NiAxLjc0TDE3LjMgOS4yYy40NC44NC43IDEuNzkuNyAyLjggMCAzLjMxLTIuNjkgNi02IDZ2LTNsLTQgNCA0IDR2LTNjNC40MiAwIDgtMy41OCA4LTggMC0xLjU3LS40Ni0zLjAzLTEuMjQtNC4yNnoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+Cg==": -IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0; +Graph.prototype.addFlowAnimationToNode=function(b,e,g,n){if(null!=b&&null!=n){var t=b.getAttribute("stroke-dasharray");if(""==t||null==t){var q=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");t=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,''):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26); +HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,''):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,''):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26); +HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,''):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); +HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGhlaWdodD0iMzZweCI+PGVsbGlwc2UgZmlsbD0iIzI5YjZmMiIgY3g9IjEyIiBjeT0iMTIiIHJ4PSIxMiIgcnk9IjEyIi8+PHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjgpIHRyYW5zbGF0ZSgyLjQsIDIuNCkiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iI2ZmZiIgZD0iTTEyIDZ2M2w0LTQtNC00djNjLTQuNDIgMC04IDMuNTgtOCA4IDAgMS41Ny40NiAzLjAzIDEuMjQgNC4yNkw2LjcgMTQuOGMtLjQ1LS44My0uNy0xLjc5LS43LTIuOCAwLTMuMzEgMi42OS02IDYtNnptNi43NiAxLjc0TDE3LjMgOS4yYy40NC44NC43IDEuNzkuNyAyLjggMCAzLjMxLTIuNjkgNi02IDZ2LTNsLTQgNCA0IDR2LTNjNC40MiAwIDgtMy41OCA4LTggMC0xLjU3LS40Ni0zLjAzLTEuMjQtNC4yNnoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+Cg==":IMAGE_PATH+ +"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0; HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight, this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler); this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(g){null!=g.relatedTarget&& @@ -2537,10 +2537,10 @@ HoverIcons.prototype.click=function(b,e,g){var n=g.getEvent(),t=g.getGraphX(),q= HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))}; HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing); var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&& -(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,R,F){if(null!=g){var I=new mxRectangle(R,F,H.clientWidth,H.clientHeight);mxUtils.intersects(I,g)&&(H==this.arrowUp?F-=I.y+I.height-g.y:H==this.arrowRight?R+=g.x+g.width-I.x:H==this.arrowDown?F+=g.y+g.height-I.y:H==this.arrowLeft&&(R-=I.x+I.width-g.x))}H.style.left=R+"px";H.style.top=F+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y- +(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,F){if(null!=g){var I=new mxRectangle(S,F,H.clientWidth,H.clientHeight);mxUtils.intersects(I,g)&&(H==this.arrowUp?F-=I.y+I.height-g.y:H==this.arrowRight?S+=g.x+g.width-I.x:H==this.arrowDown?F+=g.y+g.height-I.y:H==this.arrowLeft&&(S-=I.x+I.width-g.x))}H.style.left=S+"px";H.style.top=F+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y- this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()); -var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),t=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==t&&t==b&&(b=t=n=e=null);var q=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(H,R){var F=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H, -this.currentState.cell)||this.graph.isSwimlane(H)||!(null==F||null==q||F.height<3*q.height&&F.width<3*q.width)?R.style.visibility="visible":R.style.visibility="hidden"});A(e,this.arrowRight);A(n,this.arrowLeft);A(t,this.arrowUp);A(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")), +var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),t=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==t&&t==b&&(b=t=n=e=null);var q=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(H,S){var F=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H, +this.currentState.cell)||this.graph.isSwimlane(H)||!(null==F||null==q||F.height<3*q.height&&F.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});A(e,this.arrowRight);A(n,this.arrowLeft);A(t,this.arrowUp);A(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")), this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b}; HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b}; @@ -2550,43 +2550,43 @@ b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!= HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b}; Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),n=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var t=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(t=t.replace(/\n/g,"").replace(//g,"\n"));t=Editor.convertHtmlToText(t);this.cellLabelChanged(b,t);n=!0}e&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE, null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return n};Graph.prototype.createParent=function(b,e,g,n,t){b=this.cloneCell(b);for(var q=0;ql||Math.abs(ka.y-B.y)>l)&&(Math.abs(ka.x-y.x)>l||Math.abs(ka.y-y.y)>l)&&(null==ea||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,ea.x,ea.y)>l||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,ca.x,ca.y)>l)&&(null==M||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,M.x,M.y)>l||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,T.x,T.y)>l)){M=ka.x-B.x;ea=ka.y-B.y;ka={distSq:M*M+ea*ea,x:ka.x,y:ka.y};for(M=0;Mka.distSq){G.splice(M,0,ka);ka=null;break}null==ka||0!= -G.length&&G[G.length-1].x===ka.x&&G[G.length-1].y===ka.y||G.push(ka)}ea=ca}}}for(J=0;Jf*f&&0f*f&&(ea=new mxPoint(ja.x-M.x,ja.y-M.y),J=new mxPoint(ja.x+M.x,ja.y+M.y),G.push(ea),this.addPoints(I,G,W,d,!1,null,z),G=0>Math.round(M.x)||0==Math.round(M.x)&&0>=Math.round(M.y)?1:-1,z=!1,"sharp"==l?(I.lineTo(ea.x-M.y*G,ea.y+M.x*G),I.lineTo(J.x-M.y*G,J.y+M.x*G),I.lineTo(J.x,J.y)):"line"== -l?(I.moveTo(ea.x+M.y*G,ea.y-M.x*G),I.lineTo(ea.x-M.y*G,ea.y+M.x*G),I.moveTo(J.x-M.y*G,J.y+M.x*G),I.lineTo(J.x+M.y*G,J.y-M.x*G),I.moveTo(J.x,J.y)):"arc"==l?(G*=1.3,I.curveTo(ea.x-M.y*G,ea.y+M.x*G,J.x-M.y*G,J.y+M.x*G,J.x,J.y)):(I.moveTo(J.x,J.y),z=!0),G=[J],ea=!0))}else M=null;ea||(G.push(ja),y=ja)}this.addPoints(I,G,W,d,!1,null,z);I.stroke()}};var A=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(I,S,W,d){return null!=S&&"centerPerimeter"==S.style[mxConstants.STYLE_PERIMETER]? -new mxPoint(S.getCenterX(),S.getCenterY()):A.apply(this,arguments)};var H=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(I,S,W,d){if(null==S||null==I||"1"!=S.style.snapToPoint&&"1"!=I.style.snapToPoint)H.apply(this,arguments);else{S=this.getTerminalPort(I,S,d);var f=this.getNextPoint(I,W,d),l=this.graph.isOrthogonal(I),z=mxUtils.toRadians(Number(S.style[mxConstants.STYLE_ROTATION]||"0")),y=new mxPoint(S.getCenterX(),S.getCenterY());if(0!= -z){var B=Math.cos(-z),G=Math.sin(-z);f=mxUtils.getRotatedPoint(f,B,G,y)}B=parseFloat(I.style[mxConstants.STYLE_PERIMETER_SPACING]||0);B+=parseFloat(I.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(S,f,0==z&&l,B);0!=z&&(B=Math.cos(z),G=Math.sin(z),f=mxUtils.getRotatedPoint(f,B,G,y));I.setAbsoluteTerminalPoint(this.snapToAnchorPoint(I,S,W,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(I,S,W,d,f){if(null!=S&&null!= -I){I=this.graph.getAllConnectionConstraints(S);d=W=null;if(null!=I)for(var l=0;ll||Math.abs(ka.y-B.y)>l)&&(Math.abs(ka.x-y.x)>l||Math.abs(ka.y-y.y)>l)&&(null==ea||mxUtils.ptLineDist(B.x, +B.y,y.x,y.y,ea.x,ea.y)>l||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,ca.x,ca.y)>l)&&(null==M||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,M.x,M.y)>l||mxUtils.ptLineDist(B.x,B.y,y.x,y.y,T.x,T.y)>l)){M=ka.x-B.x;ea=ka.y-B.y;ka={distSq:M*M+ea*ea,x:ka.x,y:ka.y};for(M=0;Mka.distSq){G.splice(M,0,ka);ka=null;break}null==ka||0!=G.length&&G[G.length-1].x===ka.x&&G[G.length-1].y===ka.y||G.push(ka)}ea=ca}}}for(J=0;Jf*f&&0f*f&&(ea=new mxPoint(ja.x-M.x,ja.y-M.y),J=new mxPoint(ja.x+M.x,ja.y+M.y),G.push(ea),this.addPoints(I,G,W,c,!1,null,z),G=0>Math.round(M.x)||0==Math.round(M.x)&&0>=Math.round(M.y)?1:-1,z=!1,"sharp"==l?(I.lineTo(ea.x-M.y*G,ea.y+M.x*G),I.lineTo(J.x-M.y*G,J.y+M.x*G),I.lineTo(J.x,J.y)):"line"==l?(I.moveTo(ea.x+M.y*G,ea.y-M.x*G),I.lineTo(ea.x-M.y*G,ea.y+M.x*G),I.moveTo(J.x-M.y*G,J.y+M.x*G),I.lineTo(J.x+M.y*G,J.y-M.x*G),I.moveTo(J.x,J.y)):"arc"== +l?(G*=1.3,I.curveTo(ea.x-M.y*G,ea.y+M.x*G,J.x-M.y*G,J.y+M.x*G,J.x,J.y)):(I.moveTo(J.x,J.y),z=!0),G=[J],ea=!0))}else M=null;ea||(G.push(ja),y=ja)}this.addPoints(I,G,W,c,!1,null,z);I.stroke()}};var A=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(I,R,W,c){return null!=R&&"centerPerimeter"==R.style[mxConstants.STYLE_PERIMETER]?new mxPoint(R.getCenterX(),R.getCenterY()):A.apply(this,arguments)};var H=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint= +function(I,R,W,c){if(null==R||null==I||"1"!=R.style.snapToPoint&&"1"!=I.style.snapToPoint)H.apply(this,arguments);else{R=this.getTerminalPort(I,R,c);var f=this.getNextPoint(I,W,c),l=this.graph.isOrthogonal(I),z=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),y=new mxPoint(R.getCenterX(),R.getCenterY());if(0!=z){var B=Math.cos(-z),G=Math.sin(-z);f=mxUtils.getRotatedPoint(f,B,G,y)}B=parseFloat(I.style[mxConstants.STYLE_PERIMETER_SPACING]||0);B+=parseFloat(I.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING: +mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==z&&l,B);0!=z&&(B=Math.cos(z),G=Math.sin(z),f=mxUtils.getRotatedPoint(f,B,G,y));I.setAbsoluteTerminalPoint(this.snapToAnchorPoint(I,R,W,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(I,R,W,c,f){if(null!=R&&null!=I){I=this.graph.getAllConnectionConstraints(R);c=W=null;if(null!=I)for(var l=0;l=q.getStatus()&&eval.call(window,q.getText())}}catch(A){null!=window.console&&console.log("error in getStencil:",b,g,e,t,A)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e}; mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0=xa.x&&this.model.remove(Ba[L]);var Ha=this.model.getTerminal(N,!1);if(null!=Ha){var Na=this.getCurrentCellStyle(Ha);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[u]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[u]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var S=Graph.prototype.selectCell;Graph.prototype.selectCell=function(u, -L,N){if(L||N)S.apply(this,arguments);else{var aa=this.getSelectionCell(),ia=null,la=[],oa=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(la.push(wa),wa==aa)ia=la.length-1;else if(u&&null==aa&&0ia||!u&&0=xa.x&&this.model.remove(Ba[L]);var Ha=this.model.getTerminal(N,!1);if(null!=Ha){var Na=this.getCurrentCellStyle(Ha);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[u]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[u]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(u, +L,N){if(L||N)R.apply(this,arguments);else{var aa=this.getSelectionCell(),ia=null,la=[],oa=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(la.push(wa),wa==aa)ia=la.length-1;else if(u&&null==aa&&0ia||!u&&0Qa)for(Pa=0;Pa>Qa;Pa--)this.model.remove(Ua[Ua.length+Pa-1]);Ua=this.model.getChildCells(u[ta],!0);for(Pa=0;PamxUtils.indexOf(u,la)&&0>mxUtils.indexOf(N,la)&&N.push(la):this.labelChanged(u[aa],"")}else{if(this.isTableRow(u[aa])&&(la=this.model.getParent(u[aa]), -0>mxUtils.indexOf(u,la)&&0>mxUtils.indexOf(N,la))){for(var oa=this.model.getChildCells(la,!0),wa=0,ta=0;taQa)for(Pa=0;Pa>Qa;Pa--)this.model.remove(Ua[Ua.length+Pa-1]);Ua=this.model.getChildCells(u[ta],!0);for(Pa=0;PamxUtils.indexOf(u,la)&&0>mxUtils.indexOf(N,la)&&N.push(la):this.labelChanged(u[aa],"")}else{if(this.isTableRow(u[aa])&&(la=this.model.getParent(u[aa]), +0>mxUtils.indexOf(u,la)&&0>mxUtils.indexOf(N,la))){for(var oa=this.model.getChildCells(la,!0),wa=0,ta=0;tap&&m++;x++}c.lengthmxUtils.indexOf(aa,la)&&aa.push(la);break}else la=la.parentNode;return aa};Graph.prototype.getSelectedElement=function(){var u= -null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(u=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType== -mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,L,N){for(;null!=u&&u.nodeName!=L;){if(u==N)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,L,N){for(;null!=u&&!(0<=mxUtils.indexOf(L,u.nodeName));){if(u==N)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var N=document.createRange(); -N.selectNode(u);L.removeAllRanges();L.addRange(N)}}else(L=document.selection)&&"Control"!=L.type&&(u=L.createRange(),u.collapse(!0),N=L.createRange(),N.setEndPoint("StartToStart",u),N.select())};Graph.prototype.flipEdgePoints=function(u,L,N){var aa=this.getCellGeometry(u);if(null!=aa){aa=aa.clone();if(null!=aa.points)for(var ia=0;ia=la.length)L.remove(N);else{var oa=la.length-1;this.isTableCell(u)&& -(oa=mxUtils.indexOf(la,u));for(aa=u=0;aa= -ia.length)L.remove(N);else{this.isTableRow(aa)||(aa=ia[ia.length-1]);L.remove(aa);u=0;var la=this.getCellGeometry(aa);null!=la&&(u=la.height);var oa=this.getCellGeometry(N);null!=oa&&(oa=oa.clone(),oa.height-=u,L.setGeometry(N,oa))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(u,L){for(var N=u.tBodies[0],aa=N.rows[0].cells,ia=u=0;ia -L&&u[N].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var N=document.createElement("div");N.innerHTML=u;u=document.createDocumentFragment();for(var aa;aa=N.firstChild;)lastNode=u.appendChild(aa);L.insertNode(u)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(u)};Graph.prototype.createLinkForHint=function(u,L,N){function aa(la,oa){la.length> -oa&&(la=la.substring(0,Math.round(oa/2))+"..."+la.substring(la.length-Math.round(oa/4)));return la}u=null!=u?u:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(u)?this.getLinkTitle(u):u;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(u));ia.setAttribute("title",aa(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,aa(L,40));this.isCustomLink(u)&& -mxEvent.addListener(ia,"click",mxUtils.bind(this,function(la){this.customLinkClicked(u,N);mxEvent.consume(la)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(la,oa){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(la){la=u.apply(this,arguments);if(mxEvent.isTouchEvent(la.getEvent())&&null==la.getState()){var oa= -this.getCellAt(la.graphX,la.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,la.graphX,la.graphY)||(la.state=this.view.getState(oa),null!=la.state&&null!=la.state.shape&&(this.container.style.cursor=la.state.shape.node.style.cursor))}null==la.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return la};var L=!1,N=!1,aa=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(la,oa,wa){la==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),L=this.isCellSelected(oa.getCell()), -N=this.isSelectionEmpty(),aa=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(la,oa){var wa=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!aa&&!wa&&(N&&null==oa.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(oa.getCell())));wa=!L||wa?null:mxUtils.bind(this, -function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[la,oa,wa])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(), -"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var L=this.textarea.ownerDocument.defaultView.getSelection(),N=L.getRangeAt(0);u=Graph.createTabNode(u);N.insertNode(u);N.setStartAfter(u);N.setEndAfter(u);L.removeAllRanges();L.addRange(N)};mxCellEditor.prototype.alignText= -function(u,L){var N=this.graph.getView().getState(this.editingCell);N=mxUtils.getValue(N.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var aa=null!=N&&"vertical-"==N.substring(0,9),ia=null!=L&&mxEvent.isShiftDown(L);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var la=!0;this.graph.processElements(this.textarea,function(oa){ia||aa||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):la=!1});(la|| -aa)&&this.graph.cellEditor.setAlign(u)}aa||document.execCommand("justify"+u.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var L=[],N=0,aa=u.rangeCount;N"):wa,!0);this.textarea.className= -"mxCellEditor geContentEditable";ta=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var aa=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,la=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC, -oa=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration= -oa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=la?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=aa;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));wa=Graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT; -this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState); -this.switchSelectionState=N;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,L){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var N=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*N;this.bounds.height=60*N;var aa=null!=u.text?u.text.margin:null;null==aa&&(aa=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN, -mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=aa.x*this.bounds.width;this.bounds.y+=aa.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/N)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/N)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return N=Graph.sanitizeHtml(N,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue; -mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(L=L.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==L.substring(L.length-5)||"
"==L.substring(L.length-4))&&(L=L.substring(0,L.lastIndexOf("
")):L=L.replace(/\r\n/g,"").replace(/\n/g,"");return L};var M= -mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();M.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var O=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,L){this.graph.getModel().beginUpdate();try{O.apply(this,arguments),""==L&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&& -this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var L=this.graph.getView().scale; -return new mxRectangle(0,0,null==u.text?30:u.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?e(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint= -b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,N=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/N-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/N-L.y);N=this.graph.view.unit;this.hint.innerHTML=e(u,N)+", "+e(L,N);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint= -function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var J=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,L){J.apply(this,arguments);var N=this.graph.getCellStyle(u);if(null==N.childLayout){var aa=this.graph.model.getParent(u),ia=null!=aa?this.graph.getCellGeometry(aa):null;if(null!=ia&&(N=this.graph.getCellStyle(aa),"stackLayout"==N.childLayout)){var la=parseFloat(mxUtils.getValue(N,"stackBorder",mxStackLayout.prototype.border)); -N="1"==mxUtils.getValue(N,"horizontalStack","1");var oa=this.graph.getActualStartSize(aa);ia=ia.clone();N?ia.height=L.height+oa.y+oa.height+2*la:ia.width=L.width+oa.x+oa.width+2*la;this.graph.model.setGeometry(aa,ia)}}};var ja=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(wa){N.get(wa)||(N.put(wa,!0),ia.push(wa))}for(var L=ja.apply(this,arguments),N=new mxDictionary,aa=this.graph.model,ia=[],la=0;lau;u++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state); -this.updateLinkHint(u,L)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),L=this.tolerance,N=this.state.style.shape;null==mxCellRenderer.defaultShapes[N]&&mxStencilRegistry.getStencil(N);N=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!N&&null!=this.customHandles)for(var aa=0;aa'); -Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= -Graph.createSvgImage(18,18,'');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,''); -HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'', +Ba=0;BaC&&p++;v++}x.lengthmxUtils.indexOf(aa,la)&&aa.push(la);break}else la=la.parentNode;return aa};Graph.prototype.getSelectedElement=function(){var u=null;if(window.getSelection){var L=window.getSelection(); +L.getRangeAt&&L.rangeCount&&(u=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild); +return u};Graph.prototype.getParentByName=function(u,L,N){for(;null!=u&&u.nodeName!=L;){if(u==N)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,L,N){for(;null!=u&&!(0<=mxUtils.indexOf(L,u.nodeName));){if(u==N)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var N=document.createRange();N.selectNode(u);L.removeAllRanges();L.addRange(N)}}else(L=document.selection)&& +"Control"!=L.type&&(u=L.createRange(),u.collapse(!0),N=L.createRange(),N.setEndPoint("StartToStart",u),N.select())};Graph.prototype.flipEdgePoints=function(u,L,N){var aa=this.getCellGeometry(u);if(null!=aa){aa=aa.clone();if(null!=aa.points)for(var ia=0;ia=la.length)L.remove(N);else{var oa=la.length-1;this.isTableCell(u)&&(oa=mxUtils.indexOf(la,u));for(aa=u=0;aa=ia.length)L.remove(N);else{this.isTableRow(aa)||(aa=ia[ia.length-1]);L.remove(aa);u=0;var la= +this.getCellGeometry(aa);null!=la&&(u=la.height);var oa=this.getCellGeometry(N);null!=oa&&(oa=oa.clone(),oa.height-=u,L.setGeometry(N,oa))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(u,L){for(var N=u.tBodies[0],aa=N.rows[0].cells,ia=u=0;iaL&&u[N].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var L= +window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var N=document.createElement("div");N.innerHTML=u;u=document.createDocumentFragment();for(var aa;aa=N.firstChild;)lastNode=u.appendChild(aa);L.insertNode(u)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(u)};Graph.prototype.createLinkForHint=function(u,L,N){function aa(la,oa){la.length>oa&&(la=la.substring(0,Math.round(oa/2))+"..."+la.substring(la.length-Math.round(oa/4)));return la} +u=null!=u?u:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(u)?this.getLinkTitle(u):u;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(u));ia.setAttribute("title",aa(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,aa(L,40));this.isCustomLink(u)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(la){this.customLinkClicked(u, +N);mxEvent.consume(la)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(la,oa){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(la){la=u.apply(this,arguments);if(mxEvent.isTouchEvent(la.getEvent())&&null==la.getState()){var oa=this.getCellAt(la.graphX,la.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa, +la.graphX,la.graphY)||(la.state=this.view.getState(oa),null!=la.state&&null!=la.state.shape&&(this.container.style.cursor=la.state.shape.node.style.cursor))}null==la.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return la};var L=!1,N=!1,aa=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(la,oa,wa){la==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),L=this.isCellSelected(oa.getCell()),N=this.isSelectionEmpty(),aa=this.popupMenuHandler.isMenuShowing());ia.apply(this, +arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(la,oa){var wa=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!aa&&!wa&&(N&&null==oa.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(oa.getCell())));wa=!L||wa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa= +mxUtils.getScrollOrigin();this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[la,oa,wa])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected= +function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var L=this.textarea.ownerDocument.defaultView.getSelection(),N=L.getRangeAt(0);u=Graph.createTabNode(u);N.insertNode(u);N.setStartAfter(u);N.setEndAfter(u);L.removeAllRanges();L.addRange(N)};mxCellEditor.prototype.alignText=function(u,L){var N=this.graph.getView().getState(this.editingCell); +N=mxUtils.getValue(N.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var aa=null!=N&&"vertical-"==N.substring(0,9),ia=null!=L&&mxEvent.isShiftDown(L);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var la=!0;this.graph.processElements(this.textarea,function(oa){ia||aa||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):la=!1});(la||aa)&&this.graph.cellEditor.setAlign(u)}aa||document.execCommand("justify"+ +u.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var L=[],N=0,aa=u.rangeCount;N"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE, +mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var aa=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,la=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)== +mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle= +la?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=aa;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));wa=Graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight= +"normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=N;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u, +L){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var N=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*N;this.bounds.height=60*N;var aa=null!=u.text?u.text.margin:null;null==aa&&(aa=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); +this.bounds.x+=aa.x*this.bounds.width;this.bounds.y+=aa.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/N)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/N)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return N=Graph.sanitizeHtml(N,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html", +"0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(L=L.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==L.substring(L.length-5)||"
"==L.substring(L.length-4))&&(L=L.substring(0,L.lastIndexOf("
")):L=L.replace(/\r\n/g,"").replace(/\n/g,"");return L};var M=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&& +this.toggleViewMode();M.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var O=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,L){this.graph.getModel().beginUpdate();try{O.apply(this,arguments),""==L&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}}; +mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget= +mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?e(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,N=this.graph.view.scale; +u=this.roundLength((this.bounds.x+this.currentDx)/N-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/N-L.y);N=this.graph.view.unit;this.hint.innerHTML=e(u,N)+", "+e(L,N);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint), +this.hint=null)};var J=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,L){J.apply(this,arguments);var N=this.graph.getCellStyle(u);if(null==N.childLayout){var aa=this.graph.model.getParent(u),ia=null!=aa?this.graph.getCellGeometry(aa):null;if(null!=ia&&(N=this.graph.getCellStyle(aa),"stackLayout"==N.childLayout)){var la=parseFloat(mxUtils.getValue(N,"stackBorder",mxStackLayout.prototype.border));N="1"==mxUtils.getValue(N,"horizontalStack","1");var oa=this.graph.getActualStartSize(aa); +ia=ia.clone();N?ia.height=L.height+oa.y+oa.height+2*la:ia.width=L.width+oa.x+oa.width+2*la;this.graph.model.setGeometry(aa,ia)}}};var ja=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(wa){N.get(wa)||(N.put(wa,!0),ia.push(wa))}for(var L=ja.apply(this,arguments),N=new mxDictionary,aa=this.graph.model,ia=[],la=0;la +u;u++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state);this.updateLinkHint(u,L)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding= +function(){var u=new mxPoint(0,0),L=this.tolerance,N=this.state.style.shape;null==mxCellRenderer.defaultShapes[N]&&mxStencilRegistry.getStencil(N);N=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!N&&null!=this.customHandles)for(var aa=0;aa');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,''); +mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,''); +HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'', 24,24);mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxVertexHandler.prototype.rowHandleImage=Graph.createSvgImage(14, 12,'');mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage= HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown= @@ -2785,248 +2784,248 @@ L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state this.state.text?this.state.text.boundingBox:null,null==N&&(N=this.state),N=N.y+N.height,null!=L&&(N=Math.max(N,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(u.x+(u.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(N+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1E?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-C,0),c.lineTo(p,C), -c.lineTo(C,C),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(C,C),c.lineTo(C,v),c.lineTo(0,v-C),c.close(),c.fill()),c.begin(),c.moveTo(C,v),c.lineTo(C,C),c.lineTo(0,0),c.moveTo(C,C),c.lineTo(p,C),c.end(),c.stroke())};n.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", -n);var gb=Math.tan(mxUtils.toRadians(30)),bb=(.5-gb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(t,mxConnector);t.prototype.paintEdgeShape=function(c,m){var x=this.createMarker(c,m,!0),p=this.createMarker(c,m,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, -arguments);c.setStrokeColor(this.stroke);c.setFillColor(this.stroke);c.setDashed(!1);null!=x&&x();null!=p&&p()};mxCellRenderer.registerShape("wire",t);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(c,m,x,p,v){c.setFillColor(this.stroke);var C=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(p-C),x+.5*(v-C),C,C);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint", -q);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/gb);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*bb);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-bb)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(c,m,x,p,v,C){m=Math.min(p,v/(.5+gb));C?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-bb)*m),c.lineTo(m,.25*m),c.moveTo(.5* -m,(.5-bb)*m),c.lineTo(.5*m,(1-bb)*m)):(c.translate((p-m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*bb),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-bb)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,m,x,p,v,C){m=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),C||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0, -m),c.curveTo(0,2*m,p,2*m,p,m),C||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),C||(c.stroke(),c.begin()),c.translate(0,-m);C||(c.moveTo(0,m),c.curveTo(0,-m/3,p,-m/3,p,m),c.lineTo(p,v-m),c.curveTo(p,v+m/3,0,v+m/3,0,v-m),c.close())};R.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",R);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity= -0;F.prototype.paintVertexShape=function(c,m,x,p,v){var C=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-C,0);c.lineTo(p,C);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=E&&(c.setFillAlpha(Math.abs(E)),c.setFillColor(0>E?"#FFFFFF":"#000000"), -c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.close(),c.fill()),c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.end(),c.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(I,F);mxCellRenderer.registerShape("note2",I);I.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(S,mxShape);S.prototype.isoAngle= -15;S.prototype.paintVertexShape=function(c,m,x,p,v){var C=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;C=Math.min(p*Math.tan(C),.5*v);c.translate(m,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,C);c.lineTo(p,v-C);c.lineTo(.5*p,v);c.lineTo(0,v-C);c.lineTo(0,C);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,C);c.lineTo(.5*p,2*C);c.lineTo(p,C);c.moveTo(.5*p,2*C);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2", -S);mxUtils.extend(W,mxShape);W.prototype.size=15;W.prototype.paintVertexShape=function(c,m,x,p,v){var C=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,x);0==C?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,C),c.arcTo(.5*p,C,0,0,1,.5*p,0),c.arcTo(.5*p,C,0,0,1,p,C),c.lineTo(p,v-C),c.arcTo(.5*p,C,0,0,1,.5*p,v),c.arcTo(.5*p,C,0,0,1,0,v-C),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,C),c.arcTo(.5*p,C,0,0,1,.5*p,2*C),c.arcTo(.5* -p,C,0,0,1,0,C),c.stroke())};mxCellRenderer.registerShape("cylinder2",W);mxUtils.extend(d,mxCylinder);d.prototype.size=15;d.prototype.paintVertexShape=function(c,m,x,p,v){var C=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);c.translate(m,x);0==C?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),E?(c.moveTo(0,C),c.arcTo(.5*p,C,0,0,1,.5*p,0),c.arcTo(.5*p,C,0,0,1,p,C)):(c.moveTo(0,0),c.arcTo(.5*p,C,0,0,0,.5*p,C),c.arcTo(.5*p,C, -0,0,0,p,0)),c.lineTo(p,v-C),c.arcTo(.5*p,C,0,0,1,.5*p,v),c.arcTo(.5*p,C,0,0,1,0,v-C),c.close(),c.fillAndStroke(),c.setShadow(!1),E&&(c.begin(),c.moveTo(p,C),c.arcTo(.5*p,C,0,0,1,.5*p,2*C),c.arcTo(.5*p,C,0,0,1,0,C),c.stroke()))};mxCellRenderer.registerShape("cylinder3",d);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(l, -mxCylinder);l.prototype.tabWidth=60;l.prototype.tabHeight=20;l.prototype.tabPosition="right";l.prototype.arcSize=.1;l.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var C=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style, -"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));m=Math.max(m,K);m=Math.min(p-K,m);E||(K=0);c.begin();"left"==C?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,x)):(c.moveTo(p-m,x),c.lineTo(p-m,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));E?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K, -v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",l);l.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style, -"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(C*=Math.min(c.width,c.height));C=Math.min(C,.5*c.width,.5*(c.height-m));p||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(c.width,c.width- -x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-x),0,C,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);var C=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection", -null);E||(m*=Math.min(p,v));m=Math.min(m,.5*p,.5*v);C||(m=0);C=0;null!=x&&(C=10);c.begin();c.moveTo(C,m);c.arcTo(m,m,0,0,1,C+m,0);c.lineTo(p-m,0);c.arcTo(m,m,0,0,1,p,m);c.lineTo(p,v-m);c.arcTo(m,m,0,0,1,p-m,v);c.lineTo(C+m,v);c.arcTo(m,m,0,0,1,C,v-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15), -c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke()):"connPointRefExit"==x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};z.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",z);mxUtils.extend(y, -mxActor);y.prototype.size=30;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",y);mxUtils.extend(B,mxActor);B.prototype.size= -.4;B.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,m/2);c.quadTo(p/4,1.4*m,p/2,m/2);c.quadTo(3*p/4,m*(1-1.4),p,m/2);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};B.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction|| -this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=p,new mxRectangle(c.x,c.y+m,x,p-2*m);m*=x;return new mxRectangle(c.x+m,c.y,x-2*m,p)}return c};mxCellRenderer.registerShape("tape",B);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};G.prototype.redrawPath=function(c,m,x, -p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",G);var lb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):lb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= -function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};l.prototype.getLabelMargins= -function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(C*=Math.min(c.width,c.height));C=Math.min(C, -.5*c.width,.5*(c.height-m));p||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-x),0,C,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};z.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};I.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style, -"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",M);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c, -m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",O);mxUtils.extend(J,mxActor); -J.prototype.size=.5;J.prototype.redrawPath=function(c,m,x,p,v){c.setFillColor(null);m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(m,0),new mxPoint(m,v/2),new mxPoint(0,v/2),new mxPoint(m,v/2),new mxPoint(m,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",J);mxUtils.extend(ja,mxActor); -ja.prototype.redrawPath=function(c,m,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);m=p/5;c.rect(0,0,m,v);c.fillAndStroke();c.rect(2*m,0,m,v);c.fillAndStroke();c.rect(4*m,0,m,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ja);ea.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};ea.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)};ea.prototype.quadTo=function(c,m,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};ea.prototype.curveTo=function(c,m,x,p,v,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=C};ea.prototype.arcTo=function(c,m,x,p,v,C,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=C;this.lastY=E};ea.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"=== -typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(m-this.lastY),C=Math.sqrt(p*p+v*v);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var E=Math.round(C/10),ha=this.defaultVariation;5>E&&(E=5,ha/=3);var K=x(c-this.lastX)*p/E;x=x(m-this.lastY)*v/E;p/=C;v/=C;for(C=0;CE+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=v?O.prototype.fixedSize:O.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));v&&(C*=m.view.scale);var E=c.x,ha=c.y,K=c.width,ua=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION, +function la(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function wa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ha(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Qa(d,m,x,p){mxShape.call(this);this.bounds=d;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= +!0;this.indent=2;this.rectOutline="single"}function Pa(){mxConnector.call(this)}function fb(d,m,x,p,v,C,E,ha,K,ua){E+=K;var na=p.clone();p.x-=v*(2*E+K);p.y-=C*(2*E+K);v*=E+K;C*=E+K;return function(){d.ellipse(na.x-v-E,na.y-C-E,2*E,2*E);ua?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var m=0;mE?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(p-C,0),d.lineTo(p,C), +d.lineTo(C,C),d.close(),d.fill()),0!=ha&&(d.setFillAlpha(Math.abs(ha)),d.setFillColor(0>ha?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(C,C),d.lineTo(C,v),d.lineTo(0,v-C),d.close(),d.fill()),d.begin(),d.moveTo(C,v),d.lineTo(C,C),d.lineTo(0,0),d.moveTo(C,C),d.lineTo(p,C),d.end(),d.stroke())};n.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube", +n);var gb=Math.tan(mxUtils.toRadians(30)),bb=(.5-gb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(t,mxConnector);t.prototype.paintEdgeShape=function(d,m){var x=this.createMarker(d,m,!0),p=this.createMarker(d,m,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, +arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=x&&x();null!=p&&p()};mxCellRenderer.registerShape("wire",t);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,m,x,p,v){d.setFillColor(this.stroke);var C=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(m+.5*(p-C),x+.5*(v-C),C,C);d.fill();d.setFillColor(mxConstants.NONE);d.rect(m,x,p,v);d.fill()};mxCellRenderer.registerShape("waypoint", +q);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(d,m,x,p,v){m=Math.min(p,v/gb);d.translate((p-m)/2,(v-m)/2+m/4);d.moveTo(0,.25*m);d.lineTo(.5*m,m*bb);d.lineTo(m,.25*m);d.lineTo(.5*m,(.5-bb)*m);d.lineTo(0,.25*m);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,m,x,p,v,C){m=Math.min(p,v/(.5+gb));C?(d.moveTo(0,.25*m),d.lineTo(.5*m,(.5-bb)*m),d.lineTo(m,.25*m),d.moveTo(.5* +m,(.5-bb)*m),d.lineTo(.5*m,(1-bb)*m)):(d.translate((p-m)/2,(v-m)/2),d.moveTo(0,.25*m),d.lineTo(.5*m,m*bb),d.lineTo(m,.25*m),d.lineTo(m,.75*m),d.lineTo(.5*m,(1-bb)*m),d.lineTo(0,.75*m),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,m,x,p,v,C){m=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)d.moveTo(0,m),d.curveTo(0,2*m,p,2*m,p,m),C||(d.stroke(),d.begin()),d.translate(0,m/2),d.moveTo(0, +m),d.curveTo(0,2*m,p,2*m,p,m),C||(d.stroke(),d.begin()),d.translate(0,m/2),d.moveTo(0,m),d.curveTo(0,2*m,p,2*m,p,m),C||(d.stroke(),d.begin()),d.translate(0,-m);C||(d.moveTo(0,m),d.curveTo(0,-m/3,p,-m/3,p,m),d.lineTo(p,v-m),d.curveTo(p,v+m/3,0,v+m/3,0,v-m),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity= +0;F.prototype.paintVertexShape=function(d,m,x,p,v){var C=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(m,x);d.begin();d.moveTo(0,0);d.lineTo(p-C,0);d.lineTo(p,C);d.lineTo(p,v);d.lineTo(0,v);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"), +d.begin(),d.moveTo(p-C,0),d.lineTo(p-C,C),d.lineTo(p,C),d.close(),d.fill()),d.begin(),d.moveTo(p-C,0),d.lineTo(p-C,C),d.lineTo(p,C),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(I,F);mxCellRenderer.registerShape("note2",I);I.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle= +15;R.prototype.paintVertexShape=function(d,m,x,p,v){var C=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;C=Math.min(p*Math.tan(C),.5*v);d.translate(m,x);d.begin();d.moveTo(.5*p,0);d.lineTo(p,C);d.lineTo(p,v-C);d.lineTo(.5*p,v);d.lineTo(0,v-C);d.lineTo(0,C);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,C);d.lineTo(.5*p,2*C);d.lineTo(p,C);d.moveTo(.5*p,2*C);d.lineTo(.5*p,v);d.stroke()};mxCellRenderer.registerShape("isoCube2", +R);mxUtils.extend(W,mxShape);W.prototype.size=15;W.prototype.paintVertexShape=function(d,m,x,p,v){var C=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(m,x);0==C?(d.rect(0,0,p,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,C),d.arcTo(.5*p,C,0,0,1,.5*p,0),d.arcTo(.5*p,C,0,0,1,p,C),d.lineTo(p,v-C),d.arcTo(.5*p,C,0,0,1,.5*p,v),d.arcTo(.5*p,C,0,0,1,0,v-C),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(p,C),d.arcTo(.5*p,C,0,0,1,.5*p,2*C),d.arcTo(.5* +p,C,0,0,1,0,C),d.stroke())};mxCellRenderer.registerShape("cylinder2",W);mxUtils.extend(c,mxCylinder);c.prototype.size=15;c.prototype.paintVertexShape=function(d,m,x,p,v){var C=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(m,x);0==C?(d.rect(0,0,p,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,C),d.arcTo(.5*p,C,0,0,1,.5*p,0),d.arcTo(.5*p,C,0,0,1,p,C)):(d.moveTo(0,0),d.arcTo(.5*p,C,0,0,0,.5*p,C),d.arcTo(.5*p,C, +0,0,0,p,0)),d.lineTo(p,v-C),d.arcTo(.5*p,C,0,0,1,.5*p,v),d.arcTo(.5*p,C,0,0,1,0,v-C),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(p,C),d.arcTo(.5*p,C,0,0,1,.5*p,2*C),d.arcTo(.5*p,C,0,0,1,0,C),d.stroke()))};mxCellRenderer.registerShape("cylinder3",c);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(d,m,x,p,v){d.moveTo(0,0);d.quadTo(p/2,.5*v,p,0);d.quadTo(.5*p,v/2,p,v);d.quadTo(p/2,.5*v,0,v);d.quadTo(.5*p,v/2,0,0);d.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(l, +mxCylinder);l.prototype.tabWidth=60;l.prototype.tabHeight=20;l.prototype.tabPosition="right";l.prototype.arcSize=.1;l.prototype.paintVertexShape=function(d,m,x,p,v){d.translate(m,x);m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var C=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style, +"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));m=Math.max(m,K);m=Math.min(p-K,m);E||(K=0);d.begin();"left"==C?(d.moveTo(Math.max(K,0),x),d.lineTo(Math.max(K,0),0),d.lineTo(m,0),d.lineTo(m,x)):(d.moveTo(p-m,x),d.lineTo(p-m,0),d.lineTo(p-Math.max(K,0),0),d.lineTo(p-Math.max(K,0),x));E?(d.moveTo(0,K+x),d.arcTo(K,K,0,0,1,K,x),d.lineTo(p-K,x),d.arcTo(K,K,0,0,1,p,K+x),d.lineTo(p,v-K),d.arcTo(K,K,0,0,1,p-K,v),d.lineTo(K, +v),d.arcTo(K,K,0,0,1,0,v-K)):(d.moveTo(0,x),d.lineTo(p,x),d.lineTo(p,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(p-30,x+20),d.lineTo(p-20,x+10),d.lineTo(p-10,x+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",l);l.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style, +"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-m));p||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width- +x),Math.min(d.height,d.height-m)):new mxRectangle(Math.min(d.width,d.width-x),0,C,Math.min(d.height,d.height-m))}return new mxRectangle(0,Math.min(d.height,m),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(d,m,x,p,v){d.translate(m,x);var C=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection", +null);E||(m*=Math.min(p,v));m=Math.min(m,.5*p,.5*v);C||(m=0);C=0;null!=x&&(C=10);d.begin();d.moveTo(C,m);d.arcTo(m,m,0,0,1,C+m,0);d.lineTo(p-m,0);d.arcTo(m,m,0,0,1,p,m);d.lineTo(p,v-m);d.arcTo(m,m,0,0,1,p-m,v);d.lineTo(C+m,v);d.arcTo(m,m,0,0,1,C,v-m);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(p-40,v-20,10,10,3,3),d.stroke(),d.roundrect(p-20,v-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(p-30,v-15),d.lineTo(p-20,v-15), +d.stroke());"connPointRefEntry"==x?(d.ellipse(0,.5*v-10,20,20),d.fillAndStroke()):"connPointRefExit"==x&&(d.ellipse(0,.5*v-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*v-5),d.lineTo(15,.5*v+5),d.moveTo(15,.5*v-5),d.lineTo(5,.5*v+5),d.stroke())};z.prototype.getLabelMargins=function(d){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",z);mxUtils.extend(y, +mxActor);y.prototype.size=30;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(d,m,x,p,v){m=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,m)],this.isRounded,x,!0);d.end()};mxCellRenderer.registerShape("card",y);mxUtils.extend(B,mxActor);B.prototype.size= +.4;B.prototype.redrawPath=function(d,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,m/2);d.quadTo(p/4,1.4*m,p/2,m/2);d.quadTo(3*p/4,m*(1-1.4),p,m/2);d.lineTo(p,v-m/2);d.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);d.quadTo(p/4,v-m*(1-1.4),0,v-m/2);d.lineTo(0,m/2);d.close();d.end()};B.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),x=d.width,p=d.height;if(null==this.direction|| +this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=p,new mxRectangle(d.x,d.y+m,x,p-2*m);m*=x;return new mxRectangle(d.x+m,d.y,x-2*m,p)}return d};mxCellRenderer.registerShape("tape",B);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*d.height):null};G.prototype.redrawPath=function(d,m,x, +p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(p,0);d.lineTo(p,v-m/2);d.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);d.quadTo(p/4,v-m*(1-1.4),0,v-m/2);d.lineTo(0,m/2);d.close();d.end()};mxCellRenderer.registerShape("document",G);var lb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,m,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):lb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= +function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*m),0,0)}return null};c.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};l.prototype.getLabelMargins= +function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(C*=Math.min(d.width,d.height));C=Math.min(C, +.5*d.width,.5*(d.height-m));p||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-x),Math.min(d.height,d.height-m)):new mxRectangle(Math.min(d.width,d.width-x),0,C,Math.min(d.height,d.height-m))}return new mxRectangle(0,Math.min(d.height,m),0,0)}return null};z.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10* +this.scale,0,0,0):null};I.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(d,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style, +"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,v)],this.isRounded,x,!0);d.end()};mxCellRenderer.registerShape("parallelogram",M);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(d, +m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",O);mxUtils.extend(J,mxActor); +J.prototype.size=.5;J.prototype.redrawPath=function(d,m,x,p,v){d.setFillColor(null);m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(m,0),new mxPoint(m,v/2),new mxPoint(0,v/2),new mxPoint(m,v/2),new mxPoint(m,v),new mxPoint(p,v)],this.isRounded,x,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",J);mxUtils.extend(ja,mxActor); +ja.prototype.redrawPath=function(d,m,x,p,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);m=p/5;d.rect(0,0,m,v);d.fillAndStroke();d.rect(2*m,0,m,v);d.fillAndStroke();d.rect(4*m,0,m,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ja);ea.prototype.moveTo=function(d,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=m;this.firstX=d;this.firstY=m};ea.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)};ea.prototype.quadTo=function(d,m,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};ea.prototype.curveTo=function(d,m,x,p,v,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=C};ea.prototype.arcTo=function(d,m,x,p,v,C,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=C;this.lastY=E};ea.prototype.lineTo=function(d,m){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"=== +typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(d-this.lastX),v=Math.abs(m-this.lastY),C=Math.sqrt(p*p+v*v);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=m;return}var E=Math.round(C/10),ha=this.defaultVariation;5>E&&(E=5,ha/=3);var K=x(d-this.lastX)*p/E;x=x(m-this.lastY)*v/E;p/=C;v/=C;for(C=0;CE+K?d.y=x.y:d.x=x.x);return mxUtils.getPerimeterPoint(ha,d,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=v?O.prototype.fixedSize:O.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));v&&(C*=m.view.scale);var E=d.x,ha=d.y,K=d.width,ua=d.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,C)):K*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E+v,ha),new mxPoint(E+K-v,ha),new mxPoint(E+K,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E,ha),new mxPoint(E+K,ha),new mxPoint(E+K-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0, -Math.min(ua,C)):ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E,ha+v),new mxPoint(E+K,ha),new mxPoint(E+K,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,C)):ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E,ha),new mxPoint(E+K,ha+v),new mxPoint(E+K,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha)]);ua=c.getCenterX();c=c.getCenterY();c=new mxPoint(ua,c);p&&(x.xE+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter", -mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=v?ma.prototype.fixedSize:ma.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));v&&(C*=m.view.scale);var E=c.x,ha=c.y,K=c.width,ua=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0, -Math.min(1,C)),ha=[new mxPoint(E,ha),new mxPoint(E+K-v,ha),new mxPoint(E+K,c),new mxPoint(E+K-v,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,c),new mxPoint(E,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E+v,ha),new mxPoint(E+K,ha),new mxPoint(E+K-v,c),new mxPoint(E+K,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,c),new mxPoint(E+v,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(ua,C)):ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E, -ha+v),new mxPoint(na,ha),new mxPoint(E+K,ha+v),new mxPoint(E+K,ha+ua),new mxPoint(na,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,C)):ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E,ha),new mxPoint(na,ha+v),new mxPoint(E+K,ha),new mxPoint(E+K,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha)]);na=new mxPoint(na,c);p&&(x.xE+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter); -mxPerimeter.HexagonPerimeter2=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=v?da.prototype.fixedSize:da.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));v&&(C*=m.view.scale);var E=c.x,ha=c.y,K=c.width,ua=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(ua,C)): -ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(na,ha),new mxPoint(E+K,ha+v),new mxPoint(E+K,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E+v,ha),new mxPoint(E+K-v,ha),new mxPoint(E+K,c),new mxPoint(E+K-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,c),new mxPoint(E+v,ha)]);na=new mxPoint(na,c);p&&(x.xE+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2", -mxPerimeter.HexagonPerimeter2);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.paintBackground=function(c,m,x,p,v){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(m,x);c.ellipse((p-C)/2,0,C,C);c.fillAndStroke();c.begin();c.moveTo(p/2,C);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",fa);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(c,m,x,p,v){var C=parseFloat(mxUtils.getValue(this.style, -"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,x);c.begin();c.moveTo(p/2,C+E);c.lineTo(p/2,v);c.end();c.stroke();c.begin();c.moveTo((p-C)/2-E,C/2);c.quadTo((p-C)/2-E,C+E,p/2,C+E);c.quadTo((p+C)/2+E,C+E,(p+C)/2+E,C/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",pa);mxUtils.extend(sa,mxShape);sa.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v); -c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",sa);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,m,x,p,v){var C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,x);c.ellipse(0,C,p-2*C,v-2*C);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth= -20;qa.prototype.jettyHeight=10;qa.prototype.redrawPath=function(c,m,x,p,v,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=E/2;E=x+E/2;var ha=Math.min(m,v-m),K=Math.min(ha+2*m,v-m);C?(c.moveTo(x,ha),c.lineTo(E,ha),c.lineTo(E,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(E,K),c.lineTo(E,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+ -m),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",qa);mxUtils.extend(Ga,mxCylinder);Ga.prototype.jettyWidth=32;Ga.prototype.jettyHeight=12;Ga.prototype.redrawPath=function(c,m,x,p,v,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=E/2;E=x+E/2;var ha=.3*v-m/2,K=.7*v-m/2;C?(c.moveTo(x,ha),c.lineTo(E, -ha),c.lineTo(E,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(E,K),c.lineTo(E,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Ga);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(c,m,x,p,v){var C=p/2,E=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, -mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+C,x),new mxPoint(m+p,x+E),new mxPoint(m+C,x+v),new mxPoint(m,x+E)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(ya,mxDoubleEllipse);ya.prototype.outerStroke=!0;ya.prototype.paintVertexShape=function(c,m,x,p,v){var C=Math.min(4,Math.min(p/5,v/5));0E+K?d.y=x.y:d.x=x.x);return mxUtils.getPerimeterPoint(ha,d,x)};mxStyleRegistry.putValue("trapezoidPerimeter", +mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=v?ma.prototype.fixedSize:ma.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));v&&(C*=m.view.scale);var E=d.x,ha=d.y,K=d.width,ua=d.height,na=d.getCenterX();d=d.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0, +Math.min(1,C)),ha=[new mxPoint(E,ha),new mxPoint(E+K-v,ha),new mxPoint(E+K,d),new mxPoint(E+K-v,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,d),new mxPoint(E,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E+v,ha),new mxPoint(E+K,ha),new mxPoint(E+K-v,d),new mxPoint(E+K,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,d),new mxPoint(E+v,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(ua,C)):ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E, +ha+v),new mxPoint(na,ha),new mxPoint(E+K,ha+v),new mxPoint(E+K,ha+ua),new mxPoint(na,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,C)):ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E,ha),new mxPoint(na,ha+v),new mxPoint(E+K,ha),new mxPoint(E+K,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha)]);na=new mxPoint(na,d);p&&(x.xE+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter); +mxPerimeter.HexagonPerimeter2=function(d,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=v?da.prototype.fixedSize:da.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));v&&(C*=m.view.scale);var E=d.x,ha=d.y,K=d.width,ua=d.height,na=d.getCenterX();d=d.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(ua,C)): +ua*Math.max(0,Math.min(1,C)),ha=[new mxPoint(na,ha),new mxPoint(E+K,ha+v),new mxPoint(E+K,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,C)):K*Math.max(0,Math.min(1,C)),ha=[new mxPoint(E+v,ha),new mxPoint(E+K-v,ha),new mxPoint(E+K,d),new mxPoint(E+K-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,d),new mxPoint(E+v,ha)]);na=new mxPoint(na,d);p&&(x.xE+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2", +mxPerimeter.HexagonPerimeter2);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.paintBackground=function(d,m,x,p,v){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(m,x);d.ellipse((p-C)/2,0,C,C);d.fillAndStroke();d.begin();d.moveTo(p/2,C);d.lineTo(p/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",fa);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,m,x,p,v){var C=parseFloat(mxUtils.getValue(this.style, +"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(m,x);d.begin();d.moveTo(p/2,C+E);d.lineTo(p/2,v);d.end();d.stroke();d.begin();d.moveTo((p-C)/2-E,C/2);d.quadTo((p-C)/2-E,C+E,p/2,C+E);d.quadTo((p+C)/2+E,C+E,(p+C)/2+E,C/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",pa);mxUtils.extend(sa,mxShape);sa.prototype.paintBackground=function(d,m,x,p,v){d.translate(m,x);d.begin();d.moveTo(0,0);d.quadTo(p,0,p,v/2);d.quadTo(p,v,0,v); +d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",sa);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(d,m,x,p,v){var C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(m,x);d.ellipse(0,C,p-2*C,v-2*C);d.fillAndStroke();d.begin();d.moveTo(p/2,0);d.quadTo(p,0,p,v/2);d.quadTo(p,v,p/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth= +20;qa.prototype.jettyHeight=10;qa.prototype.redrawPath=function(d,m,x,p,v,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=E/2;E=x+E/2;var ha=Math.min(m,v-m),K=Math.min(ha+2*m,v-m);C?(d.moveTo(x,ha),d.lineTo(E,ha),d.lineTo(E,ha+m),d.lineTo(x,ha+m),d.moveTo(x,K),d.lineTo(E,K),d.lineTo(E,K+m),d.lineTo(x,K+m)):(d.moveTo(x,0),d.lineTo(p,0),d.lineTo(p,v),d.lineTo(x,v),d.lineTo(x,K+m),d.lineTo(0,K+ +m),d.lineTo(0,K),d.lineTo(x,K),d.lineTo(x,ha+m),d.lineTo(0,ha+m),d.lineTo(0,ha),d.lineTo(x,ha),d.close());d.end()};mxCellRenderer.registerShape("module",qa);mxUtils.extend(Ga,mxCylinder);Ga.prototype.jettyWidth=32;Ga.prototype.jettyHeight=12;Ga.prototype.redrawPath=function(d,m,x,p,v,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=E/2;E=x+E/2;var ha=.3*v-m/2,K=.7*v-m/2;C?(d.moveTo(x,ha),d.lineTo(E, +ha),d.lineTo(E,ha+m),d.lineTo(x,ha+m),d.moveTo(x,K),d.lineTo(E,K),d.lineTo(E,K+m),d.lineTo(x,K+m)):(d.moveTo(x,0),d.lineTo(p,0),d.lineTo(p,v),d.lineTo(x,v),d.lineTo(x,K+m),d.lineTo(0,K+m),d.lineTo(0,K),d.lineTo(x,K),d.lineTo(x,ha+m),d.lineTo(0,ha+m),d.lineTo(0,ha),d.lineTo(x,ha),d.close());d.end()};mxCellRenderer.registerShape("component",Ga);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,m,x,p,v){var C=p/2,E=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, +mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(m+C,x),new mxPoint(m+p,x+E),new mxPoint(m+C,x+v),new mxPoint(m,x+E)],this.isRounded,ha,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(ya,mxDoubleEllipse);ya.prototype.outerStroke=!0;ya.prototype.paintVertexShape=function(d,m,x,p,v){var C=Math.min(4,Math.min(p/5,v/5));0=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},document:function(d){return[eb(d,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},tape:function(d){return[eb(d,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size)))); +return new mxPoint(m.getCenterX(),m.y+x*m.height/2)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-m.y)/m.height*2))},!1)]},isoCube2:function(d){return[eb(d,["isoAngle"],function(m){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(x),.5*m.height))},function(m,x){this.state.style.isoAngle=Math.max(0,50*(x.y-m.y)/m.height)},!0)]},cylinder2:rb(W.prototype.size),cylinder3:rb(c.prototype.size), +offPageConnector:function(d){return[eb(d,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(m.getCenterX(),m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},"mxgraph.basic.rect":function(d){var m=[Graph.createHandle(d,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size)))); +return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];d=Graph.createHandle(d,["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});m.push(d);return m},step:cb(ma.prototype.size,!0,null, +!0,ma.prototype.fixedSize),hexagon:cb(da.prototype.size,!0,.5,!0,da.prototype.fixedSize),curlyBracket:cb(J.prototype.size,!1),display:cb(Ra.prototype.size,!1),cube:vb(1,n.prototype.size,!1),card:vb(.5,y.prototype.size,!0),loopLimit:vb(.5,N.prototype.size,!0),trapezoid:qb(.5,O.prototype.size,O.prototype.fixedSize),parallelogram:qb(1,M.prototype.size,M.prototype.fixedSize)};Graph.createHandle=eb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles= +function(){var d=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(d=null==d?m:d.concat(m)))}return d};mxEdgeHandler.prototype.createCustomHandles= +function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=tb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ab=new mxPoint(1,0),Bb=new mxPoint(1,0),wb=mxUtils.toRadians(-30);Ab=mxUtils.getRotatedPoint(Ab,Math.cos(wb),Math.sin(wb));var yb=mxUtils.toRadians(-150);Bb=mxUtils.getRotatedPoint(Bb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(d, +m,x,p,v){var C=d.view;p=null!=p&&0=2*p&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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))];Ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints= -function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};y.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1, -0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*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*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1, -1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,.5*(x-p)));return c};d.prototype.getConstraints=function(c,m,x){c=[];m=Math.max(0,Math.min(x,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,m));c.push(new mxConnectionConstraint(new mxPoint(1, -0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(.145, -0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};l.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,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*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,m-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1, -null,m,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));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};Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Va.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ha.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints; -Ra.prototype.getConstraints=function(c,m,x){c=[];var p=Math.min(m,x/2),v=Math.min(m-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,m-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};qa.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,"jettyWidth",qa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",qa.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, +function(d,m,x){d=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,m,.5*(x+p)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));m>=2*p&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};y.prototype.getConstraints=function(d,m,x){d=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1, +1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*p&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};n.prototype.getConstraints=function(d,m,x){d=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,m-.5*p,.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.5*(x-p)));return d};c.prototype.getConstraints=function(d,m,x){d=[];m=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));d.push(new mxConnectionConstraint(new mxPoint(1, +0),!1,null,0,m));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*x-m)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m+.5*(.5*x-m)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-m-.5*(.5*x-m)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-m-.5*(.5*x-m)));d.push(new mxConnectionConstraint(new mxPoint(.145, +0),!1,null,0,.29*m));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return d};l.prototype.getConstraints=function(d,m,x){d=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style, +"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,0)),d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,m-p,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.25*(x-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(x-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1, +null,m,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(x-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75, +1),!1));return d};Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Va.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ha.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints; +Ra.prototype.getConstraints=function(d,m,x){d=[];var p=Math.min(m,x/2),v=Math.min(m-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,m-p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return d};qa.prototype.getConstraints=function(d,m,x){m=parseFloat(mxUtils.getValue(d,"jettyWidth",qa.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",qa.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),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,m),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(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,m));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};N.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints; +!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*d,3.5*d))];x>5*d&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*d&&p.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,m));x>15*d&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};N.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints; mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15, .95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5, .5),!1)];Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, @@ -3039,51 +3038,51 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n .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)];M.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25), -!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Sa.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,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,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ea.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style, -"dx",this.dx)))),v=Math.max(0,Math.min(x,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,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return c};Aa.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,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,x-p));return c};Oa.prototype.getConstraints=function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,p));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Ua.prototype.getConstraints=function(c,m,x){c=[];var p=Math.min(x,m),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var C=p+v,E=(m-v)/2;v=E+v;c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,E,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,x));c.push(new mxConnectionConstraint(new mxPoint(.5, -1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,C));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,C));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(m+v),C));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,C));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,p));return c};Z.prototype.constraints= +!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Sa.prototype.getConstraints=function(d,m,x){d=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*p,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),.5*(x+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(m-p),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),.5*(x+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*p,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Ea.prototype.getConstraints=function(d,m,x){d=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style, +"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,p,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Aa.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(d,m,x){d=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",this.arrowSize))));p=(x-p)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),x-p));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,x-p));return d};Oa.prototype.getConstraints=function(d,m,x){d=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,p));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,m-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,x-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return d};Ua.prototype.getConstraints=function(d,m,x){d=[];var p=Math.min(x,m),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var C=p+v,E=(m-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,E,.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,x-.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,x));d.push(new mxConnectionConstraint(new mxPoint(.5, +1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,C));d.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(m+v),C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,p));return d};Z.prototype.constraints= null;u.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)];L.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)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()} -Actions.prototype.init=function(){function b(F){q.escape();F=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),F);null!=F&&q.setSelectionCells(F)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var F=q.getSelectionCells(),I=0;IMath.abs(F-q.view.scale)&&5>Math.abs(I-q.container.scrollLeft)&&5>Math.abs(S-q.container.scrollTop)&&W==q.view.translate.x&&d==q.view.translate.y&&n.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){q.isEnabled()&&(q.isSelectionEmpty()?n.actions.get("smartFit").funct(): -q.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(F,I){try{var S=mxUtils.parseXml(F);t.graph.setSelectionCells(t.graph.importGraphModel(S.documentElement))}catch(W){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+W.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= +Actions.prototype.init=function(){function b(F){q.escape();F=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),F);null!=F&&q.setSelectionCells(F)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var F=q.getSelectionCells(),I=0;IMath.abs(F-q.view.scale)&&5>Math.abs(I-q.container.scrollLeft)&&5>Math.abs(R-q.container.scrollTop)&&W==q.view.translate.x&&c==q.view.translate.y&&n.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){q.isEnabled()&&(q.isSelectionEmpty()?n.actions.get("smartFit").funct(): +q.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(F,I){try{var R=mxUtils.parseXml(F);t.graph.setSelectionCells(t.graph.importGraphModel(R.documentElement))}catch(W){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+W.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= null})}).isEnabled=A;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=A;this.addAction("saveAs...",function(){n.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=A;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var F=new EditDiagramDialog(n);n.showDialog(F.container,620,420,!0,!1);F.init()}).isEnabled=A;this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container, 320,240,!0,!0)}).isEnabled=A;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var F=null;try{F=n.copyXml(), null!=F&&q.removeCells(F,!1)}catch(I){}try{null==F&&mxClipboard.cut(q)}catch(I){n.handleError(I)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(F){}try{mxClipboard.copy(q)}catch(F){n.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(I){if(null!=I){q.getModel().beginUpdate(); -try{n.pasteXml(I,!0)}finally{q.getModel().endUpdate()}}else mxClipboard.paste(q)}),F=!0)}catch(I){}F||mxClipboard.paste(q)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function I(W){if(null!=W){for(var d=!0,f=0;f"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(d));q.setCellStyles("html",F,[I[S]])}}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=F?F:"0"],"cells",I))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=q.getView().getState(q.getSelectionCell()),I="wrap";q.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(I=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE, -I)});this.addAction("rotation",function(){var F="0",I=q.getView().getState(q.getSelectionCell());null!=I&&(F=I.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(n,F,mxResources.get("apply"),function(S){null!=S&&0"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(c));q.setCellStyles("html",F,[I[R]])}}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=F?F:"0"],"cells",I))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=q.getView().getState(q.getSelectionCell()),I="wrap";q.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(I=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +I)});this.addAction("rotation",function(){var F="0",I=q.getView().getState(q.getSelectionCell());null!=I&&(F=I.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(n,F,mxResources.get("apply"),function(R){null!=R&&0g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,e,g,n,t,q,A,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var R=0;Rd){for(R=0;Rf.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var z=null!=f?"Report":"Error",y=this.ui.getHashValueForPages(l.getShadowPages());EditorUi.logError("Checksum "+z+" in "+t+" "+W,null,this.getMode()+"."+this.getId(),"user_"+S+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=A?"-current_"+A:"")+(null!=H? -"-rev_"+this.ui.hashValue(H):"")+(null!=y?"-latest_"+y:"")+(null!=l?"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+W,action:t,label:"user_"+S+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(l){}}; -DrawioFile.prototype.sendErrorReport=function(b,e,g,n){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),H=null!=A?this.ui.hashValue(A.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),I=F.lastIndexOf(".");A="xml";0c){for(S=0;Sf.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var z=null!=f?"Report":"Error",y=this.ui.getHashValueForPages(l.getShadowPages());EditorUi.logError("Checksum "+z+" in "+t+" "+W,null,this.getMode()+"."+this.getId(),"user_"+R+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=A?"-current_"+A:"")+(null!=H? +"-rev_"+this.ui.hashValue(H):"")+(null!=y?"-latest_"+y:"")+(null!=l?"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+W,action:t,label:"user_"+R+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(l){}}; +DrawioFile.prototype.sendErrorReport=function(b,e,g,n){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),H=null!=A?this.ui.hashValue(A.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),I=F.lastIndexOf(".");A="xml";0z?this.ui.insertPage(f[l],Math.min(l,this.ui.pages.length)):this.ui.movePage(z,l)}for(l=0;lmxUtils.indexOf(f,W[l])&&this.ui.removePage(W[l]);0<=mxUtils.indexOf(this.ui.pages,d)&&this.ui.selectPage(d,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&& -this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=S;this.changeListenerEnabled=R;g||(t.history=q,t.indexOfNextAdd=A,t.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)I!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(F!=H.foldingEnabled?H.view.revalidate(): +DrawioFile.prototype.patch=function(b,e,g,n){if(null!=b){var t=this.ui.editor.undoManager,q=t.history.slice(),A=t.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=H.foldingEnabled,I=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(y){y.view.graph.isEditing(y.cell)&&(y.view.graph.scrollCellToVisible(y.cell),y.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate(); +try{if(g){for(var W=this.ui.pages.slice(),c=this.ui.currentPage,f=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),l=0;lz?this.ui.insertPage(f[l],Math.min(l,this.ui.pages.length)):this.ui.movePage(z,l)}for(l=0;lmxUtils.indexOf(f,W[l])&&this.ui.removePage(W[l]);0<=mxUtils.indexOf(this.ui.pages,c)&&this.ui.selectPage(c,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&& +this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(t.history=q,t.indexOfNextAdd=A,t.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)I!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(F!=H.foldingEnabled?H.view.revalidate(): H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!n&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b}; DrawioFile.prototype.save=function(b,e,g,n,t,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",n,"overwrite",t,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!t&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")}); else throw Error(mxResources.get("readOnly"));}catch(A){if(null!=g)g(A);else throw A;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; @@ -3195,7 +3194,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; DrawioFile.prototype.fileSaved=function(b,e,g,n,t,q,A){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(q,e,g,n,t,A)}catch(F){this.invalidChecksum= -this.inConflictState=!0;this.descriptorChanged();null!=n&&n(F);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,F);else{var H=this.getCurrentUser(),R=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),R,F)}}catch(I){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=n&&n(F)}}; +this.inConflictState=!0;this.descriptorChanged();null!=n&&n(F);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,F);else{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,F)}}catch(I){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=n&&n(F)}}; DrawioFile.prototype.autosave=function(b,e,g,n){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosavethis.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; @@ -3204,10 +3203,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,n,t,q){DrawioFile.call(this,b,e);this.title=g;this.mode=n?null:App.MODE_DEVICE;this.fileHandle=t;this.desc=q};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,g){this.saveAs(this.title,e,g)};LocalFile.prototype.saveAs=function(b,e,g){this.saveFile(b,!1,e,g)};LocalFile.prototype.saveAs=function(b,e,g){this.saveFile(b,!1,e,g)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)}; -LocalFile.prototype.saveFile=function(b,e,g,n,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var q=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var A=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),R=mxUtils.bind(this,function(F){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var I=mxUtils.bind(this, -function(W){this.savingFile=!1;null!=n&&n({error:W})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(W){this.fileHandle.getFile().then(mxUtils.bind(this,function(d){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[d],"conflict",this.desc.lastModified!=d.lastModified);this.desc.lastModified==d.lastModified?W.write(q?this.ui.base64ToBlob(F,"image/png"):F).then(mxUtils.bind(this,function(){W.close().then(mxUtils.bind(this, -function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){try{var l=this.desc;this.savingFile=!1;this.desc=f;this.fileSaved(A,l,H,I);this.removeDraft()}catch(z){I(z)}}),I)}),I)}),I):(this.inConflictState=!0,I())}),mxUtils.bind(this,function(d){this.invalidFileHandle=!0;I(d)}))}),I)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(F,b,q?"image/png":"text/xml",q);else if(F.length%position%
Email\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; +dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationDirection", +dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1}, +{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties); +Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(k,D){D=D.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&D.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(k,D){D=D.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&D.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k, +D){k=D.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLastRow","0")},isVisible:function(k,D){D=D.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&D.isTable(k.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,D){k=D.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLast", +"0")},isVisible:function(k,D){D=D.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&D.isTable(k.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"}, +{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"}, +{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(k,D){return D.editorUi.editor.graph.isCellConnectable(0%position%
Email\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; Editor.createRoughCanvas=function(k){var D=rough.canvas({getContext:function(){return k}});D.draw=function(Q){var P=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var U=0;Usa&&(sa=U.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(U.fill||"");k.setStrokeWidth(sa);k.setDashed(!1);this._drawToContext(Q,P,U);k.setDashed(pa);k.setStrokeWidth(Y);k.setStrokeColor(Z);k.setStrokeAlpha(fa)};D._drawToContext=function(Q,P,U){Q.begin();for(var Z=0;Zt;t++)for(var q=t,A=0;8>A;A++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[t]=q;Editor.updateCRC=function(k,D,Q,P){for(var U=0;U>>8;return k};Editor.crc32=function(k){for(var D=-1,Q=0;Q>>8^Editor.crcTable[(D^k.charCodeAt(Q))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(k,D,Q,P,U){function Z(ra,qa){var Ga= pa;pa+=qa;return ra.substring(Ga,pa)}function Y(ra){ra=Z(ra,4);return ra.charCodeAt(3)+(ra.charCodeAt(2)<<8)+(ra.charCodeAt(1)<<16)+(ra.charCodeAt(0)<<24)}function fa(ra){return String.fromCharCode(ra>>24&255,ra>>16&255,ra>>8&255,ra&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var pa=0;if(Z(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(Z(k,4),"IHDR"!=Z(k,4))null!=U&&U();else{Z(k,17);U=k.substring(0,pa);do{var sa=Y(k);if("IDAT"== Z(k,4)){U=k.substring(0,pa-8);"pHYs"==D&&"dpi"==Q?(Q=Math.round(P/.0254),Q=fa(Q)+fa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+P;P=4294967295;P=Editor.updateCRC(P,D,0,4);P=Editor.updateCRC(P,Q,0,Q.length);U+=fa(Q.length)+D+Q+fa(P^4294967295);U+=k.substring(pa-8,k.length);break}U+=k.substring(pa-8,pa-4+sa);Z(k,sa);Z(k,4)}while(sa);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink= -"https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,D){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var R=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){R.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,D){var Q=null;null!= +"https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,D){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,D){var Q=null;null!= k.editor.graph.getModel().getParent(D)?Q=D.getId():null!=k.currentPage&&(Q=k.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var I=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?I.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible= -function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var S=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=S.apply(this,arguments);var D=this.editorUi,Q=D.editor.graph;if(Q.isEnabled()){var P=D.getCurrentFile();null!=P&&P.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(Y){D.editor.setAutosave(Y);D.editor.autosave&&P.isModified()&& +function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var D=this.editorUi,Q=D.editor.graph;if(Q.isEnabled()){var P=D.getCurrentFile();null!=P&&P.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(Y){D.editor.setAutosave(Y);D.editor.autosave&&P.isModified()&& P.fileChanged()},{install:function(Y){this.listener=function(){Y(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){var U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(Y){D.actions.get("mathematicalTypesetting").funct()},{install:function(Y){this.listener=function(){Y(Q.mathEnabled)}; D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});k.appendChild(U);var Z=D.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";U.appendChild(Z)}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool", defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float", @@ -3393,8 +3392,8 @@ font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"# {fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties= function(k,D,Q){if(null!=D){var P=function(Z){if(null!=Z)if(Q)for(var Y=0;YN.size&&(oa=oa.slice(0,N.size));L=oa.join(",");null!=N.countProperty&&(qa.setCellStyles(N.countProperty,oa.length,qa.getSelectionCells()),ia.push(N.countProperty),la.push(oa.length))}qa.setCellStyles(u,L,qa.getSelectionCells());ia.push(u);la.push(L);if(null!=N.dependentProps)for(u=0;uL)xa=xa.slice(0,L);else for(var Ba=xa.length;Ba< L;Ba++)xa.push(ta);xa=xa.join(",");qa.setCellStyles(N.dependentProps[u],xa,qa.getSelectionCells());ia.push(N.dependentProps[u]);la.push(xa)}if("function"==typeof N.onChange)N.onChange(qa,L);ra.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",la,"cells",qa.getSelectionCells()))}finally{qa.getModel().endUpdate()}}function U(u,L,N){var aa=mxUtils.getOffset(k,!0),ia=mxUtils.getOffset(u,!0);L.style.position="absolute";L.style.left=ia.x-aa.x+"px";L.style.top=ia.y-aa.y+"px";L.style.width= u.offsetWidth+"px";L.style.height=u.offsetHeight-(N?4:0)+"px";L.style.zIndex=5}function Z(u,L,N){var aa=document.createElement("div");aa.style.width="32px";aa.style.height="4px";aa.style.margin="2px";aa.style.border="1px solid black";aa.style.background=L&&"none"!=L?L:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ra,function(ia){this.editorUi.pickColor(L,function(la){aa.style.background="none"==la?"url('"+Dialog.prototype.noColorImage+"')":la;P(u,la,N)});mxEvent.consume(ia)})); @@ -3493,18 +3492,18 @@ mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+ [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml", STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"]; mxMarker.getPackageForType=function(k){var D=null;null!=k&&0'),vb.writeln("@media print {"),vb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),vb.writeln("}"),vb.writeln(""));null!=k.editor.fontCss&&(vb.writeln('"));for(var Ab=Za.getCustomFonts(),zb=0;zb'):(vb.writeln('"))}};if(Editor.enableCssDarkMode){var Bb=hb.getBackgroundImage;hb.getBackgroundImage=function(){return U.adaptBackgroundPage(Bb.apply(this,arguments))}}if("undefined"!==typeof MathJax){var Cb=hb.renderPage;hb.renderPage=function(vb,Ab,zb,c,m,x){var p=mxClient.NO_FO,v=Cb.apply(this,arguments); -mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:v.className="geDisableMathJax";return v}}db=null;sb=U.shapeForegroundColor;fb=U.shapeBackgroundColor;mb=U.enableFlowAnimation;U.enableFlowAnimation=!1;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(db=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",U.shapeBackgroundColor="#ffffff",U.refresh());hb.open(null,null,ob,!0,jb);U.enableFlowAnimation=mb;null!=db&&(U.shapeForegroundColor=sb, -U.shapeBackgroundColor=fb,U.stylesheet=db,U.refresh())}else{mb=Za.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";hb.backgroundColor=mb;hb.autoOrigin=fb;hb.appendGraph(Za,nb,db,sb,ob,!0,jb);ob=Za.getCustomFonts();if(null!=hb.wnd)for(db=0;db'):(hb.wnd.document.writeln('"))}kb&&(Za.useCssTransforms=kb,Za.currentTranslate=ub,Za.currentScale=wb,Za.view.translate=rb,Za.view.scale=ib);return hb}var wa=parseInt(ia.value)/100;isNaN(wa)&&(wa=1,ia.value="100 %");mxClient.IS_SF&&(wa*=.75);var ta=null,xa=U.shapeForegroundColor,Ba=U.shapeBackgroundColor;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(ta=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor= -"#000000",U.shapeBackgroundColor="#ffffff",U.refresh());var Ha=qa.value,Na=Ga.value,Ua=!sa.checked,Ra=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(k,sa.checked,Ha,Na,Ca.checked,L.value,N.value,parseInt(va.value)/100,parseInt(ia.value)/100,aa.get());else{Ua&&(Ua=za.checked||Ha==pa&&Na==pa);if(!Ua&&null!=k.pages&&k.pages.length){var Qa=0;Ua=k.pages.length-1;sa.checked||(Qa=parseInt(Ha)-1,Ua=parseInt(Na)-1);for(var Pa=Qa;Pa<=Ua;Pa++){var eb=k.pages[Pa];Ha=eb==k.currentPage?U:null;if(null== -Ha){Ha=k.createTemporaryGraph(U.stylesheet);Ha.shapeForegroundColor=U.shapeForegroundColor;Ha.shapeBackgroundColor=U.shapeBackgroundColor;Na=!0;Qa=!1;var gb=null,bb=null;null==eb.viewState&&null==eb.root&&k.updatePageRoot(eb);null!=eb.viewState&&(Na=eb.viewState.pageVisible,Qa=eb.viewState.mathEnabled,gb=eb.viewState.background,bb=eb.viewState.backgroundImage,Ha.extFonts=eb.viewState.extFonts);null!=bb&&null!=bb.originalSrc&&(bb=k.createImageForPageLink(bb.originalSrc,eb));Ha.background=gb;Ha.backgroundImage= -null!=bb?new mxImage(bb.src,bb.width,bb.height,bb.x,bb.y):null;Ha.pageVisible=Na;Ha.mathEnabled=Qa;var lb=Ha.getGraphBounds;Ha.getGraphBounds=function(){var Za=lb.apply(this,arguments),hb=this.backgroundImage;if(null!=hb&&null!=hb.width&&null!=hb.height){var ob=this.view.translate,jb=this.view.scale;Za=mxRectangle.fromRectangle(Za);Za.add(new mxRectangle((ob.x+hb.x)*jb,(ob.y+hb.y)*jb,hb.width*jb,hb.height*jb))}return Za};var tb=Ha.getGlobalVariable;Ha.getGlobalVariable=function(Za){return"page"== -Za?eb.getName():"pagenumber"==Za?Pa+1:"pagecount"==Za?null!=k.pages?k.pages.length:1:tb.apply(this,arguments)};document.body.appendChild(Ha.container);k.updatePageRoot(eb);Ha.model.setRoot(eb.root)}Ra=oa(Ha,Ra,Pa!=Ua,eb.getId());Ha!=U&&Ha.container.parentNode.removeChild(Ha.container)}}else Ra=oa(U);null==Ra||null==Ra.wnd?k.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ra.mathEnabled&&(Ua=Ra.wnd.document,la&&(Ra.wnd.IMMEDIATE_PRINT=!0),Ua.writeln('