code
stringlengths
31
2.05k
label_name
stringclasses
5 values
label
int64
0
4
k||"objects";var p=l.transaction([k],"readonly").objectStore(k).getAllKeys();p.onsuccess=function(){d(p.result)};p.onerror=g}catch(q){null!=g&&g(q)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():
Class
2
EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,f=mxUtils.hasScrollbars(c.container),e=0,g=0;f&&(e=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();if(f){var d=c.getSelectionCells();c.clearSelection();c.setSelectionCells(d)}c.sizeDidChange();f&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-e,c.container.scrollTop=c.view.translate.y* c.view.scale-g);c.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,c){this.ui=a;this.color=c}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
Class
2
Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,c=function(e){return"function"===typeof e||"[object Function]"===a.call(e)},f=Math.pow(2,53)-1;return function(e){var g=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var d=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof d){if(!c(d))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k= arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=c(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=d?"undefined"===typeof k?d(r,m):d.call(k,r,m):r,m+=1;u.length=n;return u}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
Class
2
EditorUi.parsePng=function(a,c,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=c&&c(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
Class
2
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,c){return Graph.compress(a,c)};
Class
2
s;this.paintTableForeground(b,h,q,l,p)}};c.prototype.paintTableForeground=function(b,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(b,l[p],h,q)};c.prototype.configurePointerEvents=function(b){0==this.getTitleSize()?b.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
Class
2
function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Fa.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Fa.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
Class
2
BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var f=document.createElement("div");f.style.display="inline-block";f.style.paddingRight="4px";f.style.padding="6px";var e=10-c;2==e?f.style.paddingTop="6px":0<e?f.style.paddingTop=6-e+"px":f.style.marginTop="-2px";f.style.height=c+"px";f.style.borderLeft="1px solid #a0a0a0";c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","middle");c.setAttribute("src",Toolbar.prototype.dropDownImage);f.appendChild(c); c=f.getElementsByTagName("img")[0];c.style.position="relative";c.style.left="1px";c.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(f,70);c=a.getElementsByTagName("div")[0];null!=c&&(c.style.paddingRight="6px",c.style.marginLeft="4px",c.style.marginTop="-1px",c.style.display="inline-block",mxUtils.setOpacity(c,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+= " geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(f);return c};
Class
2
Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};
Class
2
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,c){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
Class
2
BaseFormatPanel.prototype.createRelativeOption=function(a,c,f,e,g){f=null!=f?f:52;var d=this.editorUi,k=d.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=e)e(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var A=k.view.getState(d.getSelectionState().cells[0]);null!=A&&x!=mxUtils.getValue(A.style,c,100)&&(100==x&&(x=null),A=d.getSelectionState().cells, k.setCellStyles(c,x,A),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[x],"cells",A)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=e);if(null!=c){var m=mxUtils.bind(this,function(r,x,A){if(A||u!=document.activeElement)r=d.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,c,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)): 27==r.keyCode&&(m(null,null,!0),k.container.focus(),mxEvent.consume(r))});k.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){k.getModel().removeListener(m)}});m()}mxEvent.addListener(u,"blur",a);mxEvent.addListener(u,"change",a);null!=g&&g(u);return n};
Class
2
ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h+.145*l,q+.145*p);b.lineTo(h+.855*l,q+.855*p);b.end();b.stroke();b.begin();b.moveTo(h+.855*l,q+.145*p);b.lineTo(h+.145*l,q+.855*p);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(b,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
Class
2
0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(b,h,q,l,p){var v=Math.min(l/5,p/5)+1;b.begin();b.moveTo(h+l/2,q+v);b.lineTo(h+l/2,q+p-v);b.moveTo(h+v,q+p/2);b.lineTo(h+l-v,q+p/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
Class
2
EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>f&&(c=a.substring(f,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
Class
2
Menus.prototype.addPopupMenuEditItems=function(a,c,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,f)};Menus.prototype.addPopupMenuStyleItems=function(a,c,f){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f)};
Class
2
Graph.prototype.visitTableCells=function(a,c){var f=null,e=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<e.length;g++){for(var d=this.getActualStartSize(e[g],!0),k=this.model.getChildCells(e[g],!0),n=this.getCellStyle(e[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),A={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;A.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+d.x),x.height+(null!=f&&null!= f[0]?f[0].point.y:a.y+d.y));A.actual=A;null!=f&&null!=f[r]&&1<f[r].rowspan?(A.rowspan=f[r].rowspan-1,A.colspan=f[r].colspan,A.actual=f[r].actual):null!=u&&1<u.colspan?(A.rowspan=u.rowspan,A.colspan=u.colspan-1,A.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(A.rowspan=parseInt(u.rowspan||1),A.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;c(A,k.length, e.length,a.x+(u?d.x:0),a.y+(u?d.y:0));m.push(A);u=A}f=m}};Graph.prototype.getTableLines=function(a,c,f){var e=[],g=[];(c||f)&&this.visitTableCells(a,mxUtils.bind(this,function(d,k,n,u,m){c&&d.row<n-1&&(null==e[d.row]&&(e[d.row]=[new mxPoint(u,d.point.y)]),1<d.rowspan&&e[d.row].push(null),e[d.row].push(d.point));f&&d.col<k-1&&(null==g[d.col]&&(g[d.col]=[new mxPoint(d.point.x,m)]),1<d.colspan&&g[d.col].push(null),g[d.col].push(d.point))}));return e.concat(g)};
Class
2
40;Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(b){var h=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,h)};Z.prototype.paintBackground=function(b,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,h,
Class
2
Graph.arrayBufferIndexOfString=function(a,c,f){var e=c.charCodeAt(0),g=1,d=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==e){d=f;break}for(f=d+1;-1<d&&f<a.byteLength&&f<d+c.length-1;f++){if(a[f]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,c,d+1);g++}return g==c.length-1?d:-1};Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=c?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Class
2
HoverIcons.prototype.click=function(a,c,f){var e=f.getEvent(),g=f.getGraphX(),d=f.getGraphY();g=this.getStateAt(a,g,d);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(e)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,c,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
Class
2
BaseFormatPanel.prototype.addActions=function(a,c){for(var f=null,e=null,g=0,d=0;d<c.length;d++){var k=this.addAction(a,c[d]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(e.style.marginRight="2px",e.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),e=k)}return g};
Class
2
Menus.prototype.createPopupMenu=function(a,c,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,c,f);this.addPopupMenuEditItems(a,c,f);this.addPopupMenuStyleItems(a,c,f);this.addPopupMenuArrangeItems(a,c,f);this.addPopupMenuCellItems(a,c,f);this.addPopupMenuSelectionItems(a,c,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,c,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
Class
2
"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("parallelogram",Q);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",P);mxUtils.extend(aa,mxActor);aa.prototype.size=.5;aa.prototype.redrawPath=function(b,h,q,l,p){b.setFillColor(null);
Class
2
Menus.prototype.addPopupMenuCellItems=function(a,c,f){var e=this.editorUi.editor.graph,g=e.view.getState(c);a.addSeparator();if(null!=g){var d=!1;1==e.getSelectionCount()&&e.getModel().isEdge(c)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(c);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&& 2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=d,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(c);d=null!=g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&& (d||e.getModel().isVertex(c)&&0<e.getModel().getEdgeCount(c))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(c)&&this.addPopupMenuCellEditItems(a,c,f)}};
Class
2
H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(b,h,q,l,p,v){v?(b.moveTo(0,0),b.lineTo(l/2,p/2),b.lineTo(l,0),b.end()):(b.moveTo(0,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(0,p),b.close())};mxCellRenderer.registerShape("message",S);mxUtils.extend(V,mxShape);V.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.ellipse(l/4,0,l/2,p/4);b.fillAndStroke();b.begin();b.moveTo(l/2,p/4);b.lineTo(l/2,2*p/3);b.moveTo(l/2,p/3);b.lineTo(0,p/3);b.moveTo(l/2,p/3);b.lineTo(l,p/3);b.moveTo(l/ 2,2*p/3);b.lineTo(0,p);b.moveTo(l/2,2*p/3);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",V);mxUtils.extend(ea,mxShape);ea.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};ea.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,p/4);b.lineTo(0,3*p/4);b.end();b.stroke();b.begin();b.moveTo(0,p/2);b.lineTo(l/6,p/2);b.end();b.stroke();b.ellipse(l/6,0,5*l/6,p);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
Class
2
mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<c.length;e++){var g=c[e];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g, null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,c,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
Class
2
Sidebar.prototype.createItem=function(a,c,f,e,g,d,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle, !0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,c,f,e,g,d);var r=new mxRectangle(0,0,g,d);1<a.length||a[0].vertex?(e=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a)); !mxClient.IS_IOS&&n&&mxEvent.addGestureListeners(u,null,mxUtils.bind(this,function(x){mxEvent.isMouseEvent(x)&&this.showTooltip(u,a,r.width,r.height,c,f)}));return u};
Class
2
this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();
Class
2
function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(b,h,q, l,p){this.outline||b.setStrokeColor(null);if(null!=this.style){var v=b.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(b.pointerEvents=!1);var J="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Y="1"==mxUtils.getValue(this.style,"right","1"),N="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||J||Y||N||y?(b.rect(h,q,l,p),b.fill(),b.pointerEvents= v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
Class
2
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,h,q,l){l=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;null!=h.style.backboneSize&&(l+=parseFloat(h.style.backboneSize)*h.view.scale/2-1);if("south"==h.style[mxConstants.STYLE_DIRECTION]||"north"==h.style[mxConstants.STYLE_DIRECTION])return q.x<b.getCenterX()&&(l=-1*(l+1)),new mxPoint(b.getCenterX()+l,Math.min(b.y+b.height,Math.max(b.y,q.y)));q.y<b.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(b.x+ b.width,Math.max(b.x,q.x)),b.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(h.style,"size",ba.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,
Class
2
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!= x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
Class
2
"editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,c,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
Class
2
mxShape.prototype.afterPaint=function(b){pb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
Class
2
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Class
2
a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
Class
2
qa);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h, 0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(b,h,q,l,p){var v=Math.min(l/5,p/5)+1;b.begin();b.moveTo(h+l/2,q+v);b.lineTo(h+l/2,q+p-v);b.moveTo(h+v,q+p/2);b.lineTo(h+l-v,q+p/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
Class
2
function A(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function E(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function T(){mxActor.call(this)}function U(b,h){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
Class
2
EditorUi.prototype.showImageDialog=function(a,c,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,c);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
Class
2
EditorUi.prototype.showBackgroundImageDialog=function(a,c){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=f&&0<f.length?(c=new Image,c.onload=function(){a(new mxImage(f,c.width,c.height),!1)},c.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=f):a(null)};
Class
2
f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
Class
2
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,c,f){mxUtils.confirm(a)?null!=c&&c():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
Class
2
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Class
2
d.value,e.cells),c.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,A,C){e=c.getSelectionState();d.value=mxUtils.getValue(e.style,
Class
2
this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,c){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
Class
2
TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,c){for(var f=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var g=this.graph.getCellGeometry(a[e]);null!=g&&(f+=c?g.width:g.height)}return f};
Class
2
function A(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function E(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function T(){mxActor.call(this)}function U(b,h){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
Class
2
p,l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=Math.min(h,p-h),y=Math.min(J+2*h,p-h);v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q, y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
Class
2
Menus.prototype.addPopupMenuCellEditItems=function(a,c,f,e){var g=this.editorUi.editor.graph,d=g.view.getState(c);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(c)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(c)&&0==g.getModel().getChildCount(c)||g.isContainer(c))&&this.addMenuItem(a, "editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,c,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
Class
2
function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Fa(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
Class
2
Sidebar.prototype.createEdgeTemplateEntry=function(a,c,f,e,g,d,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,f,e,g,d,n,u)}))};
Class
2
EditorUi.prototype.createStatusDiv=function(a){var c=document.createElement("div");c.setAttribute("title",a);c.innerHTML=a;return c};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
Class
2
Graph.createOffscreenGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
Class
2
var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
Class
2
EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas"); return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
Class
2
EditorUi.prototype.updateSelectionStateForCell=function(a,c,f,e){f=this.editor.graph;a.cells.push(c);if(f.getModel().isVertex(c)){a.connections=0<f.model.getEdgeCount(c);a.unlocked=a.unlocked&&!f.isCellLocked(c);a.resizable=a.resizable&&f.isCellResizable(c);a.rotatable=a.rotatable&&f.isCellRotatable(c);a.movable=a.movable&&f.isCellMovable(c)&&!f.isTableRow(c)&&!f.isTableCell(c);a.swimlane=a.swimlane||f.isSwimlane(c);a.table=a.table||f.isTable(c);a.cell=a.cell||f.isTableCell(c);a.row=a.row||f.isTableRow(c); a.vertices.push(c);var g=f.getCellGeometry(c);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(c)&&(a.edges.push(c),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable= !1);c=f.view.getState(c);null!=c&&(a.autoSize=a.autoSize||f.isAutoSizeState(c),a.glass=a.glass&&f.isGlassState(c),a.rounded=a.rounded&&f.isRoundedState(c),a.lineJumps=a.lineJumps&&f.isLineJumpState(c),a.image=a.image&&f.isImageState(c),a.shadow=a.shadow&&f.isShadowState(c),a.fill=a.fill&&f.isFillState(c),a.stroke=a.stroke&&f.isStrokeState(c),d=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(c.style,a.style,e))};
Class
2
Toolbar.prototype.addButton=function(a,c,f,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,c);this.addClickHandler(a,f);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,c){null!=c&&a.setAttribute("title",c);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var c=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?c:c+" mxDisabled"};a.setEnabled(!0)};
Class
2
.5*(p+h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};za.prototype.getConstraints=function(b,h,q){h=parseFloat(mxUtils.getValue(b,"jettyWidth",za.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b, "jettyHeight",za.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null, h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,3.5*b))];q>5*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q> 15*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;M.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,
Class
2
Graph.setTransitionForNodes=function(a,c){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",c)};Graph.setOpacityForNodes=function(a,c){for(var f=0;f<a.length;f++)a[f].style.opacity=c};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
Class
2
Editor.prototype.readGraphState=function(a){var c=a.getAttribute("grid");if(null==c||""==c)c=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=c&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled= "0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);c=parseFloat(a.getAttribute("pageScale"));!isNaN(c)&&0<c?this.graph.pageScale=c:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(c=a.getAttribute("page"),this.graph.pageVisible= null!=c?"0"!=c:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;c=parseFloat(a.getAttribute("pageWidth"));var f=parseFloat(a.getAttribute("pageHeight"));isNaN(c)||isNaN(f)||(this.graph.pageFormat=new mxRectangle(0,0,c,f));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:null};
Class
2
0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};
Class
2
Graph.prototype.createLayersDialog=function(a,c){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
Class
2
function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
Class
2
aa))})),m(A),m(C))}else U();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
Class
2
c.view.scale-g);c.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,c){this.ui=a;this.color=c}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
Class
2
u)}return k};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var c=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(k){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);c.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(), this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
Class
2
.2;Ia.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;b.moveTo(0,h);b.lineTo(w,h);b.lineTo(w,0);b.lineTo(v,0);b.lineTo(v,h);b.lineTo(l,h);b.lineTo(l,q);b.lineTo(v,q);b.lineTo(v,p);b.lineTo(w,p);b.lineTo(w,q);b.lineTo(0,q);b.close();b.end()};mxCellRenderer.registerShape("cross",Ia);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,
Class
2
EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),f=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,e);f.addListener(mxEvent.UNDO,e);f.addListener(mxEvent.REDO,e);f.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var d=this.editor.graph.cellEditor.stopEditing;
Class
2
this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return c(f)}})();
Class
2
mxUtils.bind(this,function(){var d=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[c])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,c){this.currentSearchEntryLibrary=null!=a?{id:a,lib:c}:null};
Class
2
try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(A.getRoot(),e.copiedValue);else for(r=0;r<C.length;r++)x(C[r],e.copiedValue)}finally{A.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?c():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){c()},null,null,Editor.ctrlKey+
Class
2
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}if(!this.ignoreImage){this.image=this.previousImage;c=a.backgroundImage;var f=this.previousImage;null!=f&&null!=f.src&&"data:page/id,"==f.src.substring(0,13)&&(f=this.ui.createImageForPageLink(f.src,this.ui.currentPage));this.ui.setBackgroundImage(f);this.previousImage=c}null!=this.previousFormat&& (this.format=this.previousFormat,c=a.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale), this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(c,f,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};mxCodecRegistry.register(a)})();
Class
2
Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,"click",function(f){a.enabled&&c(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var c=document.createElement("a");c.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);c.appendChild(f);return c};
Class
2
p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Fa.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+ y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Fa.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Fa.prototype.lineSWInner=
Class
2
EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,c){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==c&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(e){e.text().then(mxUtils.bind(this,function(g){try{var d=this.parseHtmlData(g),k="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var n=k.lastIndexOf("%3E"); 0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=d.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(e){a(null)});else if(null!=f&&0<f.length&&"text"==c&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(e){e.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)}); else a(null)}))["catch"](function(f){a(null)})};
Class
2
Graph.sanitizeHtml=function(a,c){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var c=document.createElement("a");c.setAttribute("href",a);Graph.sanitizeNode(c);return c.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()});
Class
2
DiagramFormatPanel.prototype.addOptions=function(a){var c=this.editorUi,f=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){c.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};c.addListener("connectionArrowsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),
Class
2
b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(l-30,q+20),b.lineTo(l-20,q+10),b.lineTo(l-10,q+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",F);F.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(b.width,b.height));v=Math.min(v,.5*b.width,.5*(b.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(b.width,b.width-q),Math.min(b.height,b.height-h)):new mxRectangle(Math.min(b.width,b.width-q),0,v,Math.min(b.height,b.height- h))}return new mxRectangle(0,Math.min(b.height,h),0,0)}return null};mxUtils.extend(K,mxCylinder);K.prototype.arcSize=.1;K.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);b.begin();b.moveTo(v,
Class
2
return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,l,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
Class
2
DiagramFormatPanel.prototype.addView=function(a){var c=this.editorUi,f=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(d){c.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(f.pageVisible)};c.addListener("pageViewChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}));
Class
2
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
Class
2
StyleFormatPanel.prototype.addSvgRule=function(a,c,f,e,g,d,k){var n=this.editorUi,u=n.editor.graph;k.test(c.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var A=mxUtils.trim(m.style[r]);""!=A&&"url("!=A.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=A;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3], 10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(c,"fill",mxResources.get("fill")),k(c,"stroke",mxResources.get("line")),k(c,"stop-color", mxResources.get("gradient")))};
Class
2
function Pa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
Class
2
-h);v||(b.moveTo(0,h),b.curveTo(0,-h/3,l,-h/3,l,h),b.lineTo(l,p-h),b.curveTo(l,p+h/3,0,p+h/3,0,p-h),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size", this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(0,p);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),b.close(),b.fill()),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v), b.end(),b.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);mxCellRenderer.registerShape("note2",m);m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,h*this.scale),0,0)}return null};mxUtils.extend(r,mxShape);r.prototype.isoAngle=15;r.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
Class
2
var LinkDialog=function(a,c,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text"); k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display="inline-block";c.style.top="3px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)"; mxEvent.addListener(c,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(c);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(c);g.appendChild(d);this.container=g},OutlineWindow=function(a,c,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,c,f,e,g,!0,!0);this.window.minimumSize=
Class
2
EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var k=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||d.getSelectionCells();k=d.getExportableCells(d.model.getTopmostCells(k));for(var n={},u=d.createCellLookup(k),m=d.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
Class
2
function Pa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b, h,q,l,p){this.paintTableLine(b,this.line,0,0)};a.prototype.paintTableLine=function(b,h,q,l){if(null!=h){var p=null;b.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?b.moveTo(w.x+q,w.y+l):null!=p&&b.lineTo(w.x+q,w.y+l));p=w}b.end();b.stroke()}};a.prototype.intersectsRectangle=function(b){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(b,
Class
2
G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(M,mxActor);M.prototype.size=
Class
2
arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(b,h,q,l,p){b.begin();b.moveTo(h,q);b.lineTo(h+l,q);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke();b.begin();b.moveTo(h,q+p);b.lineTo(h+l,q+p);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
Class
2
this.currentScale,u=this.currentTranslate;k=new mxRectangle((k.x+2*u.x)*n-u.x,(k.y+2*u.y)*n-u.y,k.width*n,k.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(k){k=this.strokeWidth;this.graph.useCssTransforms&&(k/=this.graph.currentScale);return k};mxGraphView.prototype.getGraphBounds=function(){var k=this.graphBounds;if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;k=new mxRectangle((k.x+n.x)*u,(k.y+n.y)*u,k.width*u,k.height* u)}return k};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var c=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(k){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);c.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
Class
2
mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
Class
2
Sidebar.prototype.createVertexTemplateFromData=function(a,c,f,e,g,d,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,f,e,g,d,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,f,e,g,d,k,n){return this.createItem(a,e,g,d,c,f,k,n)};
Class
2
function Menu(a,c){mxEventSource.call(this);this.funct=a;this.enabled=null!=c?c:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,c){this.funct(a,c)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,c){this.editorUi=a;this.container=c;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Class
2
"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Qa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
Class
2
q&&l.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(A,K){var P={event:"remoteInvokeResponse", msgMarkers:d.msgMarkers};null!=K?P.error={errResp:K}:null!=A&&(P.resp=A);this.remoteWin.postMessage(JSON.stringify(P),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}), y.push(function(A){k(null,A||"Unkown Error")}),this[l].apply(this,y);else{var z=this[l].apply(this,y);k([z])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(A){k(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
Class
2
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,g);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
Class
2
ArrangePanel.prototype.addGeometryHandler=function(a,c){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!c(x,u,m[r]))){var A=g.view.getState(m[r]);null!=A&&g.isRecursiveVertexResize(A)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d= u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
Class
2
BaseFormatPanel.prototype.addAction=function(a,c){var f=this.editorUi.actions.get(c);c=null;null!=f&&f.isEnabled()&&(c=mxUtils.button(f.label,function(e){f.funct(e,e)}),c.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),c.style.marginBottom="2px",c.style.width="210px",a.appendChild(c),result=!0);return c};
Class
2
function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,l,p){var q=!0,x=window.setTimeout(mxUtils.bind(this,function(){q=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(x);
Class
2
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==c?a+"?":a+"&",a+=f+"="+urlParams[f],c++;return a};
Class
2
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",a),c.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,c,f){return this.graph.view.getState(this.graph.getCellAt(c,f))};
Class
2
HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(c){c.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
Class
2